Do you think that James Damore would have been better off had he apologized and groveled to the mob of shamers? Even after he lost his job? (which there was no chance of avoiding - as you say, he went against the CEO of "one of the most prominent companies in the world".) That seems rather implausible if you know how these mobs generally behave. Forbearance - of the sort you might expect from an individual who has been wronged and sought appropriate restitution - never happens, because it's not a stable equilibrium. What happens is that the "storm" eventually blows over naturally, but that's a rather different dynamic.
Not sure if he would have been better off or not. I'm glad he didn't grovel; we shouldn't incentivize mobbing innocent people, especially under overtly false pretenses (though it's entirely unfair that the innocent party has to endure all of the consequences for doing what is right while the mobbers get off scot-free).