SEOUL—Investment in U.S. chip production is on the rise. But so too, is semiconductor spending elsewhere.

Samsung Electronics Co. ’s planned $17 billion chip factory in Texas is expected to crank out top-end semiconductors that are essential to 5G cellular networks, self-driving cars and artificial intelligence. It follows hefty bets on U.S. soil by Intel Corp. , Taiwan Semiconductor Manufacturing Co. and Texas Instruments Inc.