Primarily it would be a bloody conflict with significant loss of life. If China is victorious they would gain control over dirt that the world's best electronics industry used to exist on top of. The whole world loses.
or after initial action, US will refuse actively engage, and Taiwanese government surrender to safe own people lives.
The same measure is taken for other valuable targets. For example, many major bridges in the US are rigged to self-destruct in the event of capture during land invasion. You won't find much information about this online. All I can say is, there's a reason why many jobs at the US DOT require a security clearance. If you want to read up on another real world example of this, here's an article about how Switzerland implemented this: https://99percentinvisible.org/article/designed-for-demoliti...
There is an interesting theory by Dimitry Khalezov concerning 9/11. He states that this was also done for the NYC World Trade Center and the Chicago Sears Tower. He claims the event occured because a bad actor gained control of this demolition system for the WTC, and that the planes were part of a cover story. It's an interesting explanation. Check it out if you're interested: https://youtu.be/IU7KRHOdnuo