Regarding Palpatine, I’d argue that it’s likely not a mystery that he becomes the emperor. When Amidala says that they need his help, most of the audience is going to think “Oh no.”
That said, it doesn’t have to be immediately obvious that he’s truly behind everything going on. If set up the right way, the audience can piece the truth together at the same time as the characters. To me, that’d be a more interesting journey - thinking that we’re rooting for the bad guy because he’s helping against the other bad guys but then realizing that he was behind everything all along.