If the push comes to shove, a US carrier group parked in Taiwan's territorial waters makes any sea invasion impossible if it's willing to shoot at Chinese ships; you can't ship and land a million soldiers across a hostile sea, and China can't (at the moment) win the sea battle.
It's debatable to what extent USA is willing to fight for that, but if it chooses to do so, then now and at least until 2030 USA has enough military might to enforce a stalemate/status quo across the Taiwan strait, no matter how much it gets escalated. China can force Kinmen and Matsu islands, but invading Taiwan proper requires either USA not joining the war or a stronger China.
So IMHO the fate of Taiwan in this century depends on how much USA will be willing to intervene to protect it; and the physical location of semiconductor factories is a big factor influencing that willingness.
It's debatable to what extent USA is willing to fight for that, but if it chooses to do so, then now and at least until 2030 USA has enough military might to enforce a stalemate/status quo across the Taiwan strait, no matter how much it gets escalated. China can force Kinmen and Matsu islands, but invading Taiwan proper requires either USA not joining the war or a stronger China.
So IMHO the fate of Taiwan in this century depends on how much USA will be willing to intervene to protect it; and the physical location of semiconductor factories is a big factor influencing that willingness.