1) China could have a regime change. This could either lead to voluntary reunification or at least to military action becoming irrelevant.
2) Xi could die, and the successor might have other priorities.
3) China could lose the ability or confidence to invade, for instance if their economy is destroyed by corruption or they stop investing in their armed forces.
4) Taiwan could develop their own nukes in secret, and be too scary to invade.
5) The threat could become reality (and thus no longer a threat). China may proceed to either win or lose such a war. In such a scenario, it's hard to say what remains of TSMC's capacity after.
In my view it’s not a China Taiwan conflict more a US China one.
Edit: China is trying to get hold of Taiwan politically not necessarily militarily and if I’m not mistaken the US said they will not tolerate this either.
From what I've been reading, the support for reunification within the Taiwanese population has been going down for a long time. The current talk of invasion could reflect Xi giving up on that possibility.
As for what would happen if some day the majority in Taiwan actually supported a peaceful reunification, the US wouldn't like it, but it wouldn't be easy for the US to defend attempts to stop it militarily.
Now, that wouldn't completely rule out some kind of covert support for a military coup or something. But if the support for reunification is large enough, the US would probably have to accept it.
Edit: Also, 1-4 are not that unrealistic, if you give it enough time. In fact, if enough time passes with no invasion (or peaceful reunification with the CCP still in power), one of them is likely to happen I would say.
It could take 30 years though, and we could be deep into some kind of singularity event before it happens. For instance, TSMC could end up building the largest AI on the planet using their own chips, and by using that become more powerful in all ways than China itself. (Possibly at the cost of human extinction).
As soon as the west is more independent from China again the conflict will enter into the next phase. Any military activity in and around Taiwan will brain drain the country very quickly and most of the talent will go to western companies.
30 years is a hell lot of time these days.