Construction cranes still surround the brand-spanking new plant in Kulim’s industrial park in Malaysia. But inside, legions of workers hired by the Austrian tech giant AT&S are already gearing up to produce at full capacity by year’s end.

Outfitted in head-to-toe coveralls, with oversized safety glasses and hard hats, they’re reminiscent of the worker bees in the movie “Minions,” but color coded by function: Blue for maintenance. Green for vendors. Pink for janitors. White for operators.

AT&S is just one of a flood of European and American companies that have recently decided to move to or expand operations in Malaysia’s electrical and electronics manufacturing mecca.

The American chip giant Intel and the German corporation Infineon are each investing $7 billion. Nvidia, the world’s leading maker of chips powering artificial intelligence, is teaming up with the country’s utilities conglomerate to develop a $4.3 billion artificial intelligence cloud and supercomputer center. Texas Instruments, Ericsson, Bosch and Lam Research are all expanding in Malaysia.

The boom is evidence of how much geopolitical friction and competition are reshaping the globe’s economic landscape and driving multibillion-dollar investment decisions. As rivalries between the United States and China over cutting-edge technology simmer and trade restrictions pile up, companies — particularly those in crucial sectors like semiconductors and electric vehicles — are looking to strengthen their supply chains and production capabilities.