These hypotheticals are way too favorable towards all of the non-Apple tech companies that gorged themselves during the irrational exuberance of the past two years. Since when was Google or Meta in danger of being outcompeted by a rival company who overhired to eat their lunch, rather than by their own mistakes? Were all of these overhired personnel really being put on vital projects necessary for the survival of these companies?
Perhaps some companies this analysis held true. But in most cases it seems just like a reactionary keeping up with the Joneses overhiring spree. Companies saw others doing it, and they imitated, not out of some sound financial policy.
Moreover, it doesn't pay to be a hero on Wall Street. Like you hint at here, it's much safer to go with the crowd and be wrong than to go against the crowd and be wrong. That's just a fact of life in business.
Ultimately CEOs of large companies are paid tons of money to be the person responsible for the company direction, so holding them responsible for making a wrong decision is fine. Just wanted to say that while hindsight is 20/20, it’s not necessarily the case that it was a poor decision in the moment when sometimes you have to play the odds.