And there are far more consumers than there are factory workers, so outsourcing is more of a benefit than a negative in an economy.
Give manufacturing to the cheapest foreign labor. It's a good thing. This is why things like NAFTA are a net benefit to the US economy.
The obvious solution for the secondary problems this creates is to increase local industries for local jobs. What can someone do here that absolutely must be done here, instead of by a person in China?
Things like construction works well, where you need someone local to build something since it can't be outsourced - you need to be here. Other traditionally conservative jobs like farming and mining would also be included, but also things like teaching and retail and other service jobs.
The long-term solution is higher-skill jobs, pushing the state-of-the art since US has the top universities.