You can decide this is punishment and it might feel that way to RMS, but I think we can all agree sexism is a bad trait to have in the most senior leadership position of an organization founded around principles of liberty in expression and action. RMS was bad for that cause, and he couldn't keep his position on pure tenure and prestige anymore.
As we all know, real liberty is when one person has power over others who object to it.
I wouldn't want a person in my team voicing sexists opinions, I would want that person removed from the team. Let alone as a figurehead and leadership figure.
But this is presuming that Stallman's behavior was only personal in the first place. He has a history of poor behavior at MIT and in his roles for the FSF, which definitely bleeds into the professional.
That's a position with enormous rhetorical value to you. You can use that framing to turn a conversation about a man's actions over time into a philosophical question.
That way you can avoid any inconvenient particular facts.
No one really needed media sensationalism to draw a pattern of behavior unbefitting the leadership of the FSF. That some random people overstated some aspects of his Epstein thoughts isn't really why this happened.
It's also a bit ironic you've decided to call it a witch hunt. Witch hunts happened when folks decided to start blaming women for everything without even a veneer of logic or civility. And here we are with a man, having possessed a long history of specific behaviors, being called to account for exactly those behaviors. It's ironic simply because the privileges RMS was exercising are so ingrained in your worldview that demanding he stop treating women like lesser beings is–to you, at least fundamentally irrational and unfair demand.
RMS had hundreds of other controversial opinions. Uttering them did not result in this. In fact, no single act of sexism got him here either. So suggesting that this is merely society punishing a misunderstood outsider on a whim is itself pretty uncalled for.