Don't think the avengers analogy works.
People knew about endgame a couple years (or more) before Infinity War was released. I guess the analogy works if you label it as Infitinity War I and II like the original slide that was shown. But if it was just there was another avengers moving coming, people would still be hyped because the previous avengers flicks weren't really tied together. They were just new stories, not continuations.
As for ST, if you're going to successfully use palp, then, he's gotta be revealed to some extent in TLJ - he wasn't.
I'm going to go off on a tangent here. I just watched Knives Out last night. Written and Directed by RJ. It was really good. It changed my opinion of TLJ. I don't think of him as a hack who had no idea about his source material. I think of him as wanting to insert his own ideas into an existing story and it blew up in his face. When you're working as part of a team (for lack of a better word), you don't get to just up and do whatever the hell you want in your part. You have to stay within scope. He didn't. He went off wildly. And pretty much everyone disagreed with his choices. I think a lot of his choices could have been redeemed in IX, but i think it takes more work than they had time for in one flick. Plus, you have to get someone who liked what he did to continue in that direction to finish it off.
IX had too much to do. Carrie dying was a major problem. Backlash to 8 another major problem. I think had they only had one problem to deal with, things would have come out better. They spent all their time having to deal with the other issues that i'm sure the decision for palp was a very short discussion so they could check something off the list. Hell, they still could have used him....Maybe Kylo found the temple - abandoned - and in it the spirit of Palpatine. Maybe do it ala the Exar Kuhn story line or something. Kylo is the big bad, but you still get to use Palpatine without the massive facepalm component.