I'd expect high-margin items like semiconductors to be more amenable to onshoring anywhere - certainly Intel has almost all of its fabs in highly developed countries, but I think this is hardly a cost efficiency move - rather it's a hedge against the failure of globalization and the risk of the US losing access to advanced semiconductor technology in case of strife in Taiwan. Russia has already lost this access. TSMC took in about $56B in '21, of which about $28B was 'cost of revenue', the amount they needed to spend on supporting this revenue (marketing, legal, production, e.g., not building factories or R&D). There's certainly room for increased production costs while maintaining a profit.
[0] - https://www.researchgate.net/figure/TSMC-personnel-structure...