It isn't 100% causality, but it was definitely one of the ways it was sold to people through PR/propaganda.
Free trade / globalism was the larger "true" move, and yes getting away from unions and high wages to maximize profits was a big part.
Corporations made a change from valuing stakeholder value (employees, communities, customers, suppliers, the nation) to pure shareholder value (profits over everything else, despite the long term result that profits by any and all means hurts all stakeholders and eventually can cannibalize the company unless you have monopolistic moats).
I promise you the people in the towns where the factories were closing were 100% against it. And the corporations never tried to claim that "at least your town will be cleaner" probably because they were mostly leaving behind superfund sites they were trying to avoid cleaning up.
Was the New Yorker crowd clinking glasses together talking about how good it was to get the dirty steel mills out of the country? Sure maybe but this argument never resonated with anyone on the ground.
Were companies actively moving factories offshore so they could be dirtier because they didn't have to comply with American environmental laws? Absolutely.