Two policies could fix this. A negative income tax (with UBI) and a state backed insurance policy that either pays out as free retraining, or as wage insurance.
Read my comment from above. There are no jobs in which a assembly line worker can easily retrain.
No company on Earth would ensure these types of workers, in the same vein as insurance companies didn't ensure people with expensive pre existing conditions until forced by the gov. If it's subsidized, then just call it what it is: another tax. Unfortunately, the government already runs a massive deficit, so not sure how it can be afforded...