In a scenario of such magnitude, there should be a "day zero," meaning that regardless of whether half the planet remains without power, Bitcoin should cease to be used, and when it is restored, it should compensate from that point of failure. This way, you avoid 51% attacks or blocks mined at a low difficulty, which would be disastrous—like accidentally putting a product on sale at a low price in a supermarket.
The idea would be that periodically, the Bitcoin network would "mark" a block as a secure reference point. This marked block would act as a global consensus on the state of the chain at that moment. In the event of a catastrophic event (such as a massive blackout or a 51% attack), the network could restart from the last marked block, thus avoiding issues like chain reorganization or mining at an incorrect difficulty.