Chris Clairemont (writer for the XMen for 17 years, who wrote all the backstories we know and love) specifically says he based Magneto and Xavier on Malcolm X and MLK Jr.
There's a documentary about Clairemont's X-Men on Amazon Prime.
The documentary on the Claremont *X-Men* run is great about this. Apparently Claremont and Louise Simonson would just keep a running list of loose threads, and whenever they ran out of plots, they'd just go pull at an old loose thread for a while.
The X-men were designed as a metaphor for all marginalized groups, it’s not brain dead, it’s history:
https://www.amazon.com/Chris-Claremonts-X-Men-Claremont/dp/B079J6V7CZ
if you have amazon prime he has a doc on there. He didnt leave too happy. Great doc BTW
https://www.amazon.com/Chris-Claremonts-X-Men-Claremont/dp/B079J6V7CZ