I think Palpatine coming back and delving into his using the dark side to maintain his consciousness in the physical realm could have worked if they had tied it more into one of the themes of the prequels, that of learning to let go of your attachments in the mortal world and--ultimately--not to fear death and what lies beyond. Palpatine feared death and sought to extend his life far beyond what it should have been. They should have played into that in TRoS.
If I could go back and redo things to try and make a bit more sense of it, I would have said that Palpatine had actually existed for centuries by the time of the movies ("I am all the Sith!"), and was using the dark side to possess and take over the bodies of his apprentices once his own body began to fail him, but the body he was possessing needed to have enough midi-chlorians (they're canon, deal with it) to handle Palpatine's essence, which is why he was so obsessed with Anakin.
But then Anakin got Kenobi'd and he was no longer a suitable host for him, and he was getting older, so he started trying to figure out how to create a clone body with midi-chlorians (tying into the mysterious cloning project we saw in The Mandalorian and The Bad Batch) but because of their mystical nature it was proving difficult to replicate them. Then he learned about Luke and started working to turn him and possess him, but then Anakin destroyed Palpatine's body, though he did manage to transfer his spirit to his secret base on Exegol, where he was essentially stuck because, while he had made progress on cloning a body rich with midi-chlorians, the bodies deteriorated way too fast and he couldn't leave Exegol.
That's why he lured Ben Solo to him, he was going to finally get his hands on one of those Skywalker bodies full of sweet midi-chlorians, but then he learns of Rey, who is just as strong as Ben, and decides she would be a better host for him because she is, essentially, his genetic daughter, making the possession much less of a risk and more viable long-term.