It's interesting that many politicians, including Trump and Sanders, want policies to prevent jobs from leaving the US, but have no policy proposals around automation.
If you want manufacturing jobs to stay in the US, regulating automation would be far more effective than trying to prevent companies from outsourcing jobs. (Incidentally, a lot of jobs that have been outsourced probably would have been automated if outsourcing had not been possible, and that's what opponents of outsourcing are missing.)
I'm very much against a policy to restrict automation, but it's worth pointing out.