Answering in reverse.
Is there any way to patch up this situation?
Its called money and recognition.. IE the money and recognition that Alice was screwed out of in favor of Jeb. Literally only way to fix this bridge. Also an apology from everyone in the command chain who didn't stop that stupid idea. It might not be enough, but its the best that can be done.
Is Alice just flexing, or is there something I'm not seeing here?
Not really... There is a lot of difference in the productivity of 1 senior engineer who has been leading development on a project, and staying late for the past x years. And 20 junior engineers who have been working on a project for the past week, month, or year.
TBH it would take you at least 4-5 good senior engineers to replace Alice's productivity in the short term should she decide to leave, and by short term I mean sometime 3-6 months in the future... No way to immediately replace Alice's productivity. Long term one good engineer could probably get where Alice is in 4-5 years, if you are lucky. Though why one good engineer would stay with a company that mistreats engineers is beyond me.
TLDR: You might be in trouble, should she leave. And its unlikely that you company will be able to retain good engineers in the future. The story of how the company screwed over Alice is going to be water cooler talk/remain in the back of minds of your engineers for a long time.
Why does each and every team member supposedly need to know all 4 at the same time
Because it is an integrated system? If you divide that knowledge across 4 people instead of one, that means that you can no longer fix bugs in the system because the knowledge is too diffuse for them to make connections and see bugs that are occurring across boundaries. Also its not that hard to become proficient in all 4 just takes a couple of years of learning things.
Apparently we "need" to use shell, python, terraform, and node, instead of 1 language
You apparently don't understand your product. As an outsider looking in, I would guess:
Node for web interface. Terraform to configure the cloud architecture for scale. Python unsure. Could be business logic (though node could do that), could be database scripts, could be productivity scripts automating tedious/repetitive tasks, could be your backend, who knows? Alice, Alice knows.
Shell is just there to automate mind-numbing repetitive tasks command line tasks.
As an aside... I hate node.js a lot. javascript is a horribly designed language. A nightmare to debug/maintain compared to reasonably designed languages. Often the only person who can maintain it is the person who wrote it. On that note, Alice might be the only person at your company capable of maintaining your system. And she just started looking for a new job. I recommend that you start polishing your resume, your current employer's future prospects are a little grim.
One final thing:
to remedy this, we hired nearly 2 dozen contractors, trained them, and tasked them with handling the work Alice used to do
Why didn't you just increase Alice's pay by the amount that you would pay 1 dozen contractors? Seems like that is cheaper both short term and long term than hiring 2 dozen contractors who are going to spend the next 3-9 months figuring out what is going on.
TLDR: Screwing your principal engineer is a bad idea. Engineering is a knowledge based job. The technical lead for your product, system, whatever, has an intimate understanding of how the system works that would take someone else years to achieve, if they ever manage to achieve it. The more specialized/innovative your product is, the longer it would take for someone else to become competent with it.
As a side note you wouldn't happen to have Alice's phone number handy, would you? I know some people who are hiring