In President Trump’s first two years in office, factory job growth accelerated, an achievement he has been claiming credit for ahead of the 2020 election, particularly in the industrial Midwest. His administration is “restoring American manufacturing,” Mr. Trump told workers at an Ohio factory in March.

Some of the 465,000 factory jobs that the country created in 2017 and 2018 are in the most economically beleaguered counties that voted for Mr. Trump in 2016. But the biggest winners have not been the traditional manufacturing hubs where workers have been hammered this century by outsourcing and automation, federal statistics show.

Instead, factory job creation has flowed to frontiers of the advanced manufacturing economy — like Nevada, home to a Tesla factory that churns out batteries for electric cars, homes and utilities — and oil-patch epicenters like Tulsa, Okla. The strong growth includes large contributions from the booming craft brewing, wine and spirits industries, which the federal government classifies as manufacturing and added nearly 30,000 jobs in that time.

The vast majority of the factory jobs have come in counties that were already adding factory employment before Mr. Trump took office. And a disproportionate share of the expansion was concentrated in prosperous areas like Silicon Valley and Houston.