Well, no: Han died because that was Harrison Ford's precondition for coming back to play the character, Luke didn't die he transcended, and Leia died because Carrie Fisher did. Indeed, one of the reasons the third film ended up such a mess is that they had to do last minute rewrites to account for that. That, and undermining all the good plot threads from Last Jedi.
Comparing Star Wars and Star Trek makes no sense, apples and oranges. Is Last Jedi better than most Star Trek movies? Yes, because there are only 4 good Star Trek movies, but even good Star Wars and good Star Trek are doing different things. It's like trying to compare a romantic comedy and a horror movie head to head, they have different artistic goals and criteria. Just because both have "Star" in the title is misleading.