Mark Hamill was simply too old. Star wars has always been geared towards children, even though adults love it too.
But it's hard for young people to relate to a 70 year old hero. So no matter what else happened, luke had to be in the wise old teacher role.
The other problem is that because of the books and some video games, everyone expected Luke to have become the strongest Jedi ever. But if that were the case then there would be no credible threat to him and you'd have no story to tell. So they had to effectively make it a power loss story for him.
So they settled on "luke failed as a teacher and an uncle, and created a monster that's responsible for the death of millions, and every single Jedi here's ever trained is either dead or turned evil, so he cuts himself off from the force"
I don't think it was the worst direction to go in. Personally, I would have written it like this:
Luke does become the most powerful force weilder in the universe, and over the years he's had to fight stronger and stronger dark side users. So in his travels and studies of the force be finally learns the secret--the force balances itself.
Which means when the light side becomes more powerful, the force increases the dark side power to balance itself. So for instance, when the Jedi were running shit, the force was imbalanced. So the Darkside became stronger and not only lured a guy like Palatine, but allowed him to gain much more power than he would have if the force was already balanced.
So what this means for Luke is that all this time he was trying to get stronger, he was just creating more evil in the universe.
So Luke finally concludes that this dynamic will make people fight these wars forever. And that the only way to truly restore balance is to kill all sith AND Jedi.
So his goal is to Kill snoke and kylo, then himself. But he knows he's not strong enough to beat them both, so he's faced with a moral dilemma... He can train Rey because she can help him win, but he will have to kill her right after they win.
I think that would be a much more interesting setup.