This makes no sense. China doesn't want Taiwan because of TSMC, it wanted Taiwan long before TSMC was a major player. The only effect of destroying factories would be to make Taiwan poorer, while China would still get what it wanted.
Not invading Taiwan:
+ China gets to profit from selling phones, computers, etc. to the west
- China doesn't get to own a piece of land
Invading Taiwan:
+ China owns a piece of land
- China can't manufacture anything the west is interested in.
You're right that this isn't why China want's Taiwan. But the point is that it would also make China poorer. In fact, it would be highly likely to cause a global recession of a magnitude that could threaten the Chinese government due to pressure from it's own citizens.