Mac desktops or also laptops? If it's only about the desktops, I suspect that they are preparing to lower the volumes below what's economical to build in China.
It's likely a combination of lower volume, like you state, cheaper automation, rising wages and some political incentives like tax breaks, etc.
The wages don't play much role in it.
There is an article about the last Apple US factory, back when they used to make stuff here, and the guys managing it explain that it wasn't the wages that drove them to China (the extra cost would be negligible in a product's price, like a few extra dollars compared to a $500 price tag), but the economies of scale, with supplier factories for glass, metal, SSDs, parts, etc being literally next door to your factory, something that wasn't true in the US.