IMO Magneto works best as a villain BECAUSE of his tragic backstory, not in spite of it. Magneto is somebody who survived a genocide and learned all the wrong lessons from it. He's somebody who survived a systemic attempt to wipe out his entire race, but instead of learning "Never again," the lesson he learned was "I'll do it to them before they can do it to me." It's a brilliant villain origin story because it means we understand, but don't excuse, the things he does. His actions are still wrong but we appreciate why he does them. It makes him a fantastic villain, arguably Marvel's best, and I think him being a hero loses sight of that.