Tolkien was a philologist who loved word-play and his Middle Earth stories are full of plays on words. The defeat of the Witch-king was an in-story play on the word "man" and its various meanings. It was prophecised that the Witch-king would not be defeated by "man".
The actual quote is, "Do not pursue him! He will not return to these lands. Far off yet is his doom, and not by the hand of man shall he fall."
The Witch-king took that to mean mankind. But the prophesy actually meant "man" in the narrowest sense, that is, a human male.
Actually, the Witch-king was fleeing the battlefield when this was said, so it is not clear that he heard the original statement.
Later, at the battle in which he dies, he says, "Hinder me? Thou fool. No living man may hinder me!" Note that he's broadened it out from how he shall not fall by the hand of man, to how no man can so much as slow him down. Sounds like a telephone game, to me
That is why Merry as a non-human male and Eowyn as a human female were able to defeat him.
Calling Merry non-human is a tad dicey. Hobbits consider themselves a different people, but in various places Tolien is fairly clear that hobbits are "relatives" of Men, a "variety" or "separate branch" of mankind. This is borne out in how, in the SIlmarillion, we know the origins of elves, dwarves, men, ents, orcs, and all. But Hobbits don't come up.
Nothing to do with politics. Everything to do with philology.
I think it is also clear homage to Macbeth -
"Be bloody, bold, and resolute. Laugh to scorn
The power of man, for none of woman born
Shall harm Macbeth."
And Macbeth is then killed by someone who was, in effect, born by Caserian Section. This predated Tolkien by several hundred years - the trope solidly established.