For decades, Taiwan has limited how and how much its tech firms like TSMC could invest in mainland China. Are there lessons for the United States?