It can work in the right context.
For example, maybe in the MCU the mutants have been suppressed by a brutal dictatorship in some Middle Eastern country, which we can call Genosha for argument’s sake, and so kept hidden from the rest of the world. A group of them, the core X-Men, escape and make it to the USA, the land of opportunity, to seek asylum.
Automatically, they would be hated by the anti-immigration crowd. This would be reinforced when people discover that they also have super-powers. There is already a section of the MCU public that dislikes how the super-powered are getting away with taking matters into their own hands, so the mutants would incur more controversy. This becomes even more of a hot topic when people discover that the mutants were born that way and so if they “cross breed” with regular humans then their children may well become mutants too. When one of the immigrants, Xavier, tries to get the US government to help his people back home, the fear of war makes more people fear the mutants.
This negativity would become more pronounced when one of the immigrants, Magneto, traumatized from the way he was punished in his home country, pushed over the edge by some rough treatment by Americans, flips out and resorts to more radical ways of securing not just equal treatment but superior treatment for his people. This also frees Magneto from being tied to his World War 2 roots.
So the first film could set all of this up and end with Xavier and the X-Men stopping Magneto and his sect from completely wrecking things, yet still leaves the mutants in a very precarious situation.
This does not have to preclude things like Weapon X either as it is still probable that the government in Canada, or anywhere else, did have some people who knew about this and tried to come up with their own mutant programs in deep, deep secret (so deep that even Fury did not know about it).
Basically, replacing homophobia with immigration as the hot topic of panic for the modern world.