X-Men has been a platform to discuss bigotry for a very long time. You can see whichever subgroup you want in mutants because Claremont (and to a lesser extent previous writers) put parallels to every subgroup he could think of.
Yes Magneto is a terrorist, he's also the villain, but he's a villain with a point. Remember he's a Holocaust survivor, he's this stuff before, or at least he's pretty sure he's seen it before. In the comics they develop that stronger with some character popping in from the future, a future in which everything Magneto fears has come to pass. As well as fear of Holocaust 2 Magneto is also driven by ego, he really likes being a really powerful mutant, which is really the thing that pushes him over from being someone merely concerned (like Charles) to a terrorist.
I don't think any of that makes it tainted, because he's the bad guy. The bad guy is supposed to do and say things that are wrong, that's why they're bad guys.
Magneto was, in my mind, the only really compelling character in the 3rd film. I enjoyed the first and second X-Mens, but this last one left me cold. My understanding is that they changed directors. Whatever caused it, the drop in quality was marked.