Those things aren’t mutually exclusive. Yes, they are dumping massive resources into SMIC. Yes, they also want to maintain imperialism over Taiwan, and TSMC is a part of that. Some of it is fear-mongering sure, but China is consistently confrontational in the South China Sea and beyond. There’s a reason they enforce an abrasive naval presence there and continue to press against the Philippines.
https://www.ft.com/content/b4ee2e18-3256-4371-8369-9a3118959fca
they also want to maintain imperialism over Taiwan
Not to deny the realities of the tensions there, but liberals are relatively loose with term imperialism. There is a difference between an imperialist state like the US and an anti-imperialist — and until recently imperialized — state like China.
China is consistently confrontational in the South China Sea and beyond
Yeah why so confrontational, China?
Foreign Policy, 2013: Surrounded: How the U.S. Is Encircling China with Military Bases. And that article is a decade old; it’s only gotten worse.
The US has over 750 overseas military bases around the world, and is building more to further encircle China. Meanwhile China has one anti-piracy base in Djibouti.