I don’t think Han should have died in ROTJ.
The problem is that it was difficult to figure out what to do with his character after the rescue. They decided to throw him with the Endor ground team, but it often feels like he’s just along for the ride. But then, I guess the same could be said about Leia. The problem is, unlike the first two movies, post-Jabba ROTJ is the first time in Star Wars where the main characters’ involvement in the unfolding plot doesn’t exactly seem necessary. Like, why are Han and Leia specifically leading the Endor ground team? It could really be any senior Rebel doing this, and neither Han nor Leia have been established as “Seal Team Six” types. Luke, on the other hand, ends up doing something that only he specifically can do: confronting Vader.
This is unlike ANH and ESB, where each character is doing things specific to that character’s ongoing arc. In ANH, Han is a smuggler/criminal caught up in larger events, and Leia is a Senator secretly leading a Rebellion. In ESB Leia continues leading the Rebellion and Han is split between his old life and his new responsibilities. But in ROTJ, we’re just suddenly presented with some mission parameters by the Rebellion’s top brass, and for arbitrary reasons our beloved main characters are assigned arbitrary roles. (Why is Lando - who we’ve only found out even joined the Rebellion a few seconds ago - given a leading role in this critical mission? Something about the Battle of Taneb?)
A more natural use of the characters, given their previous history, would be for Leia to replace the role of Mon Mothma or Ackbar, for Han to lead the attack in the Falcon, and for Luke to lead the Endor ground team. Alternatively, it would also make sense for Luke to lead Rogue Squadron in the Endor space battle. But the problem is that it’s simply not feasible to write the story this way, because this would effectively remove Leia from most of the onscreen action, and it would separate the main cast even further. Plus, whatever role Luke is assigned, he needs to abandon at some point in order to go confront Vader. So it’s pretty difficult to find a way to satisfactorily position all the main cast given the parameters of the Battle of Endor, in a way that feels completely natural in-Universe but is also dramatically effective.
I think to really make it all work, the parameters of the Battle of Endor themselves would need to be reworked in some way. I feel like Han really should be in the Falcon, but then we need something for Lando to do. Maybe an entirely new subplot is required, like having Lando recruit a secondary fleet of smugglers or whatever. (Oh god that sounds like Rise of Skywalker, nevermind.)