I wonder about the consequences of a possible 51% CPU attack on the Bitcoin blockchain. Imagine that a state invests enough processing power to rewrite an entire blockchain that is longer than the current bitcoin blockchain (possibly because the state wants to control money). In this fake blockade, all blocks would be empty (no transactions), meaning that the state has all bitcoins as a result of mining.
Would it really be the end of Bitcoin in this case? It seems to me that it would be easy to patch the nodes in the network to discard the fake blockchain, for example by blocking the public key of the state.
This would violate Bitcoin's intention that math and cryptography replace trust in a third party, but ultimately Bitcoin is used by people who need to trust it. They would not want their entire money to be destroyed by an attack.
Or is 51% harder to detect and repair? I'm not asking about short-chain attacks that would rob only some traders, but about the global stability of Bitcoin.