Exactatiously.
It's all well and good to acknowledge the allegory and metaphor inherent within the X-Men as a franchise but...be mindful that:
1: The metaphorical and allegorical application is largely imperfect, open to interpretation and not without reproach
2: Writers who are aware of the metaphorical and allegorical weight the X-Men carry will not always get it right. In fact they, more often than not, fall way short of the mark.
3: Care and attention must be paramount when it comes to writers purporting the metaphorical and allegorical ideologies of the X-Men.
That's why I can honestly say, after decades of reading, it's probably my least favourite 'aspect' of the X-Men as a franchise.