Nope. Marvel proves that it can be done. The movies just have to be good. Marvel also has messages most can agree with. I think they also keep a tighter control on those making the film. Basically, don't insult the fans of your series. At the very least, don't point to our films as agreeing with or pushing your political leanings.
I've always disliked the MCU comparison with Star Wars.
The consumer is used to 2 or 3 MCU movies per year. They're all each different enough due to the very nature of comic book heroes. They all have different powers, they all have different goals and stories, different antagonists. Star Wars doesn't have that luxury in the way that it's being managed right now. It's the good guys vs the Empire. It's lightsabers and blasters vs lightsabers and blasters. It's Star Destroyers, the Millennium Falcon, X-Wings and Tie Fighters.
While the MCU is bringing fresh content to the consumer, Star Wars is *still* relying on nostalgia to push the franchise.
I think the main problem with Star Wars is that it's not really "fresh". They had the opportunity to show the mass market some of the more crazy shit that can happen in that universe and they've dropped the ball. It's essentially just more of the same in each movie. Sure, there's a market for that, but it's no where near as big as they expect it to be after the initial "bump" that came from bringing it back.
On top of that, they put a very average movie (that honestly, nobody really asked for) in a very busy release schedule. Infinity War, Deadpool 2 and Jurassic World 2 are all major movies and all 3 have had a consistent stream of positive advertisement and media attention. The previous 3 Star Wars movies have had the advantage of being the "must see" movie upon release, while Solo has a ridiculous amount of competition.
There's many reasons for Solo failing beyond the apparent political agendas you're concerned about. It's been poorly managed.