You are absolutely correct that just low wages by themselves are not enough to attract manufacturing on a global scale.
There are a lot of prerequisites (power/transport infrastructure, capable workers, political stability, organizational know-how) plus also network effects and advantages from local demand, and Chinese government did a really good job at providing all this over the last half-century.
But the majority of those would already be met in a lot of western economies, and wage IS the number one factor to build factories in China instead of, say, Italy.
I also really wanted to stress this because people love to gloss over this wage-gap, and pretend that US manufacturing would get an immediate resurgence if we only abolished environmental regulations, or gave industry juicy tax-breaks/incentives, or invested heavily into relevant education programs-- but IMO those arguments are mostly a sham, and the core problem is that US workers are neither willing to work for $5/h nor are consumer willing to pay the difference.