Automation, remote work, AI, and the gig economy are all dramatically changing the nature of work.

As US president Trump has made “bringing jobs back to America” a rallying cry, others have pointed out that even the factories that stay are, thanks to automation technology, getting more work done with fewer people.

According to a new survey, the same is happening with factories in China, a major outsourcing partner for US manufacturing companies.

The Wuhan University study, according to the South China Morning Post, followed 11,300 employees and their 1,200 employers in the provinces of Guangdong and Hubei for two years. It found that labor shortages were among manufacturers’ biggest concerns and that 40% of manufacturers in those provinces have introduced automation technology.

Average manufacturing wages throughout China, although they are still much lower than in the United States, have been rising steadily for more than a decade, and, according to the survey, worker turnover in Guangdong and Hubei is high. About 25% of workers in the study transferred jobs in 2015 and 2016. “With high worker turnover, they have to pay workers more to retain them,” Albert Park, a professor at Hong Kong University of Science and Technology and a co-designer of the survey, told the Post.

One reaction to rising wages in some areas of China has been for manufacturers to shift work toward poorer places, where wages can differ greatly, or out of the country entirely. Cities meanwhile use tax breaks and subsidies to keep factories competitive: About half of the companies in the Wuhan University study had accepted such aid. And, as in the US, more expensive labor makes automation more attractive. In 2015, according to the International Federation of Robotics, factories in China bought 68,000 industrial robots, 20% more than the year before, and more than all European countries combined.

The choice between outsourcing and automation, in other words, isn’t necessarily a binary one.