It's a great question. Few people know or care about the actual details and mechanisms of this sort of thing.
I'm pretty sure there are clearing houses involved and they carry the (ultimate) risk. I hope someone can give you a more detailed answer.
So it's "CME Clearing" ...
Turns out there is an obscure entity called "CME Clearing" which is the clearing house for CME.
On this CME page ...
https://www.cmegroup.com/clearing.html
they rattle on about the features of "CME Clearing" but the only reason it exists is to payout in exactly the situation asked about in this question.
The default waterfall ..
Indeed this exactly explains the default waterfall:
https://www.cmegroup.com/clearing/risk-management/financial-safeguards.html
How much they got?
This random wiki article http://www.marketswiki.com/wiki/CME_Clearing mentions they have eight billion.
This doco https://www.cmegroup.com/clearing/cme-clearing-overview/safeguards.html suggests about five billion?
Note that once that runs out (in a really dramatic event - so a war halts the oil supply or the like) the original question posed here remains. IMO in such a historic situation, as usual the government would step in and print money to bail out all banks universally, then bail out favored parties, and then have a small bailout ("up to 100k" or such) for individuals. (Just like everyone got 300 bucks for covid!)
Other random info...
There's a random comment here that: https://www.investopedia.com/terms/l/limit-move.asp
The CME requires institutional members to contribute to a fund to cover defaults by counterparties, as do all futures exchanges
I've never heard of that and don't know any details on it and dunno how factual it is. It could be the person is referring to "CME Clearing", or it may just be mixed-up information.
You may be aware (I've always found this strange) most commodities actually have a daily limit (!) on how much the price can change. (!) The exchange and underwriter just state that that's it, it can't rise or fall by more than X. When this does happen, you tend to get a few days in a row where it just limits out (sort of instantly first thing in the morning!) with people desperately trying to clear out exactly the "disastrous endgame" you ask about in the question. Example article on daily limits on oil, etc https://www.investopedia.com/terms/l/limit-move.asp