China, as a country, has at times hosted over 50% of Bitcoin's hashrate,
This is not a very accurate statement.
There were multiple mining pools that were inside China and a lot of hashrate (many of which was located outside China) connected to those pools. Pretty much the same thing is happening with pools in other countries like the situation that is growing in USA.
That is a big distinction to make because in this case China did not and could not "control" that hashrate.
And whomever controls over 50% of the hashrate can dictate the software in use, and/or dictate the contents of the blockchain.
Not quite.
With a high percentage of hashrate, one can perform certain attacks but they can not change the consensus rules (if that's what you mean by dictate the software in use). They can pull off 51% attacks to double spend but what would that achieve except kill Bitcoin?
They also won't be able to attack Bitcoin for long in my opinion because such a move would bring on a lot of public outrage which could even lead to a hard fork changing the mining algorithm.
As the theory goes, if China wanted to wreak havoc on the world economy, or if it wanted to extract a ransom,
Bitcoin is not big enough to have an impact on the world economy. Not to mention that if China wanted to do that, they would do it without needing something as small as Bitcoin. For example they could dump the US bonds and crash US economy and burn half the world's economy with that. Or simply stop exporting goods to certain countries including US and EU and crash their economy by causing hyperinflation,....
or if it simply wanted to profit by inserting its own blocks,
That logic is flawed in this context.
If you have hashrate you "insert" your blocks and make profit. If you perform an attack, you'd crash the price and doesn't matter if you mine 100% of the blocks, you won't make any profit.
Perhaps China could decide that Satoshi's blocks should be given away to charity.
That requires a hard fork which means it requires
the entire network to accept that change and upgrade to a new software. Otherwise they'd create an altcoin and what they'd sped would not be Satoshi's coins.
Maybe they change the architecture so that it worked better in China, or conformed to their "laws" or something.
Similarly requires a hard fork.
2. What would be the technical implications of China doing this?
Any kind of attack on Bitcoin would first crash its price. Depending on the attack it could be significant which means a lot of the goals you listed above would never be reached (like making profit).
3. What would be the geopolitical implications?
Bitcoin is not big enough and is not weaved into the geopolitics to have such an impact.
4. What would this do the broader cryptocurrency sector?
It would force developers to get off their fannies to start working on decentralizing mining more. Like introducing a much better protocol for mining pools.
5. Have major governments e.g. the US and NATO countries ever (publicly) announced any contingency planning around this problem? Putting a $1.5T asset at risk is something that could rattle the entire world economy. This seems like something they would at least think through?
I'm more worried about US performing such attacks on Bitcoin than China doing so.
For starters, China doesn't have any significant hashrate ever since they banned mining. And also China is not known for destabilizing global economy like this. In fact China prefers more stability in the world so that they can make more money.
US regime on the other hand benefits from chaos, whether it is armed conflict that fills the pockets of the "Lords of War" or it is economic chaos where they can pull off their Ponzi scheme commonly known as the dollar.