But lashing out at German carmakers could inflict wounds in this upstate swath of South Carolina. In March, BMW’s chief executive, Harald Krüger, said Mr. Trump’s auto tariffs “would have an impact on jobs in the United States.” In a June letter to the Commerce Department, the company said it might cut investment and production in Spartanburg if selling its American-made sport-utility vehicles abroad became too expensive.

Already this year, BMW stopped exporting the X3 crossover from Spartanburg to China and began making more of the S.U.V.s in plants in Shenyang, China, and Rosslyn, South Africa.

It announced last week that it would increase production capacity to 520,000 vehicles in its two Shenyang plants next year, overtaking the total production in Spartanburg. This week, the Chinese government announced that it would allow BMW to increase its stake in the Shenyang joint venture to 75 percent from 50 percent, making it the first foreign carmaker to own a majority of a manufacturing operation in the country.

Those overseas moves are being watched warily here. “This directly affects us,” said A. J. Cemprola, a software developer at BMW’s Spartanburg plant. “It isn’t talk anymore.”

Mr. Cemprola, 30, said the job helped him pay off his student loans and buy a four-bedroom home with his wife. Everyone in town, he said, works at BMW or knows someone who does.

“This area has grown a lot from BMW, and it’s been great for South Carolina,” he said. “And we don’t want that to change.”