When Taiwanese giant Foxconn announced plans to build a massive factory for high-end televisions in 2017, many cheered, including President Donald Trump. Electronics manufacturers had long ago abandoned America for cheaper countries, especially China, so the investment seemed to mark a reversal, albeit one that came with a significant amount of subsidies.

But what Foxconn will do in southeastern Wisconsin is now in question. The company has discovered that it is hard to get thousands of Midwesterners to work long hours at stressful assembly-line jobs for relatively low pay. Earlier this month, Trump personally intervened and persuaded Foxconn’s boss, Terry Gou, not to pull out. Even so, Foxconn has scaled back its mass-manufacturing plans, and an insider confirms that it will now make only unspecified quantities of “high-value products.”

At first glance, the Foxconn reversal confirms that American manufacturing is in trouble. A closer look, however, suggests manufacturing is undergoing a revival, especially among agile smaller firms and those using advanced techniques.

According to the Bureau of Labor Statistics, manufacturing employment has seen two years of strong employment growth. Other economic indicators show more than two years of overall expansion in the sector as well. Some factors: The Boston Consulting Group found the cost of manufacturing is approaching parity for the U.S. and China, while Chinese costs were an eighth lower 15 years ago. Conference Board researchers found that the trend toward localizing supply chains from 2011 to 2016 has made a difference.

Take the German company Trumpf. With its North American hub in Connecticut, it makes high-end machines for companies such as John Deere and Bloomington-based Toro. Sales rose 21 percent to $699 million last fiscal year.

In a nearby town, family-owned Carey Manufacturing, after experiencing issues with quality and price outsourcing to China, invested $2.5 million in Trumpf automated equipment and brought the work back to Connecticut. The new machines allow Carey to be more nimble, and it has more than doubled revenue in three years.

John Carey, founder of the company that bears his name, said his biggest problem is the same as Foxconn’s: finding enough skilled workers at a price he can afford. The U.S., he said, must prioritize developing a highly skilled manufacturing workforce.

The evidence suggests that if America builds it, companies will come.