Also note that this development (low-skill manufacturing migrates to growing, lower-wage country, then the migration propagates up the tech level) is something that occured basically exactly the same way in the past (with Japan in the 1990s).
> now they have all the factories and they also have rising standards of living so ... seems to be working for them?
This is basically the point of international trade.
Things also worked out for the US, because they reaped the fruits of that cheap Chinese labor-- all-American electronics would have been significantly more expensive.
I'd also like to point out that those living standards are WAY below US levels-- there is absolutely no way that US-americans with comparable education levels would be willing to work in comparable conditions.
Note also that artificially messing with this process has consequences: If the US had forced electronics and heavy industry to stay fully domestic starting in the 80s or so (with tariffs, regulations and subsidies), then their products would have stayed much less affordable for decades, and a lot of bright STEM graduates that made software/CPU development/Hi-tech happen might have taken cushy, tax-payer funded jobs instead...