You have to understand that one of the things that GRRM did with ASOIF is that he gave all of the "red shirt" characters backstories. He doesn't do spear-carriers. Every character is a main character. One of the reasons that it works so well is that IRL everyone is the main character in their own story. He keeps you guessing as to who the main characters in his story actually are.
This level of character development is also the reason that his books are the size of car batteries and take five years apiece. Keep in mind, he wrote GOT (Book I) in 1996, (started it in 1991!) and it barely sold enough to keep his contract alive. Stories abound of him being alone at signing tables on tour.
How do you balance creating peril, while still keeping readers engaged and not feeling manipulated?
I have a major character die in Book II of my series. I did a few things, here, to keep the reader engaged.
EDIT:
0.1) I didn't kill off any supporting characters. I kill off one guy who shows up for like a chapter, and a couple of (literal) lackeys--and an entire castle full of people you never meet--but I killed no supporting cast; almost nobody with lines dies. I did not abuse my privileges. The death of the major character therefore comes out of practically nowhere.
1.) The character who dies is more powerful than the character who lives. His death shows the very real possibility that the main character is going to die. Readers have reached out to me to tell me that, after his death scene, they honestly had no idea how the MC would get out of this. It looks completely hopeless.
1a.) It forces a couple of shifts in the MC's character in order for him to survive, not the least of which is relying on other people's judgment and not taking things into his own hands every time. If he had taken things into his own hands and done it his way, he wouldn't have survived. So, character growth.
1b.) I set up the death of the major character by making it look like he had everything under control, and suggesting through other plot points that he could make it through this while still having plenty for him and the MC to do for the rest of the book.
2.) The MC accepts what he has to do as a suicide mission, and I wrote an internal monologue scene and scenes of mourning to set up that he's okay with dying if in the process he manages to set things right. (It's a technothriller; a major allegorical subtext of the series is retaining human agency in the face of a looming technological disaster. He figures that the only way he can stop the ball rolling and unscrew all the damage he's caused is if he, himself, dies.)
And he's not wrong. He survives, but the ball keeps rolling and getting bigger. Because, series.
3.) I wrote the remainder of the book to provide for the continuation of the story without the MC. The thing he inadvertently started is now much bigger than him, making his death reasonable and even expected. As a consequence, another character I wrote into this book in a supporting role has ended up being pivotal to the entire arc of the world--his presence is what will take this from a S&S adventure series into actual, world-rocking epic fantasy--and I toyed with the idea of killing off my MC as well and continuing the series with that new character as the focus. I wrote every fight scene, battle sequence, and love scene following the other MC's death in such a way that it would be fulfilling if the remaining MC died at the end of the book and the cast of supporting characters took up the mantle. #JusticeForJarrod.
4.) That new character is probably going to be the most important person in the world in millennia, but from the perspective of the MC (and therefore for the rest of the series) he's basically the Faramir of this whole thing. I'm already sketching out a series about him. His importance shifts the MC of the past two books into a red-shirt slot. The most important thing the MC will ever do in the history of the world is introduce this new guy into the equation. Everything else from here is secondary. The world doesn't actually
need him anymore. And we all know what happens to unnecessary characters in fantasy. So, peril. For all you know, I'm going to drop a piano on him a few pages later.
5.) I used parallel construction in the final fight scene with the MC against the Big Bad, employing phrasing, tension, pacing, and at some points even rhythmic devices in a similar way to the fight scene between the Big Bad and the MC who dies. Readers subconsciously pick up on this. It's music; you can't
not hear it. It feels like he's going to die, because a few hours ago you read a fight that read just like this, and the good guy died. It's subtle but it adds a sense of creeping dread. (It also took a hell of an editor to not let me overdo it.)
6.) The readers now know that this isn't Disneyland; anyone can die, no matter how tough and likable. Book III is turning out really fun to write.