I guess I'm not seeing any big lesson other than "don't start a price war during a budding pandemic when the market is already saturated."
Some of the oil companies that are over-leveraged may go bankrupt. Their assets will get repossessed and resold, presumably at a discount, to new owners who will continue to produce the oil. Or, they're pre-negotiate some sort of bankruptcy deal to write down some of the debt, and continue operations with a lower debt load.
I struggle to follow the logic that because the oil industry got hit with by a one-two punch, the world should abandon petroleum. It'd be akin to abandoning agriculture during the Dust Bowl. That train of thought is stunningly illogical, as is the thought of "this is a great time to institute a carbon tax." Instituting a big ol' tax hike right when 22 million people have lost their jobs doesn't seem particularly wise.
FWIW, the US has been a net exporter of all petroleum products since some time in November 2019, and of natural gas since some time before that. That's one major why all the recent kerfuffles in the middle east haven't moved the needle on oil prices very much, and that new supply is a big reason why Russia started the price war.
@FireLane producing oil at a loss is different from paying someone to take it off your hands. The article you linked explains why producers may still pump oil at low (positive) prices, because even at those low prices, they can offset some or all of their fixed costs. Why would they ever spend the money to produce the oil, and then pay someone to take it off their hands?
As for states and countries basing their budgets on a volatile commodity, other than OPEC and a few other areas, who would that be?
One more thought: Even if you divest from petroleum companies in your portfolio, the entire world relies on petroleum in some way, whether it be for energy or as raw materials for plastics and other chemicals. So even if your ESG index fund doesn't include oil companies, pretty much everything else on the list relies on them.