Tesla Inc.'s plan to build a new assembly plant in Mexico is a clear sign the country will be a center for electric-vehicle making, even as the U.S. tries to bolster domestic, union-based manufacturing with the Biden administration's Inflation Reduction Act.