Palpatine should have returned as a force ghost and Ghost Luke could have fought him
If they insisted on bringing back Palpatine, they should have made him into a force ghost to help Kylo Ren. And that in turns gives Luke, also a force ghost something to do to fight against him.
I think that would have worked better. Because the movie doesn’t really explain very well how he had survived ROTJ.