If they thought being told they could learn to code was condescending, I hate to think what their reaction would to be someone suggesting they work in call centers.
Which isn't to argue with the idea that there's *got* to be a way to do something other than telling comforting lies while assuring folks that the country doesn't intend to just leave them behind.
I agree, telling them to "just" replace their job like a pair of pants is incredibly hostile and condescending. Truth in a bad way. Because if those workers could do it, they already would have. No one chooses to die of black lung. Might as well tell them to learn a foreign language, or go to the moon. They might as well be Natives and us telling them "glory and fortune awaits on the other side of the trail of tears". That is how they view their prospect in life, and how they feel about this sort of suggestion. No hope, no belief, no understanding. All they got left are sweet sweet lies about the "good old days". And that won't last either.
BTW, learning and adapting is a child's game. No, seriously, the older we get the more our brains resist new information. Re-training would only work for a portion of the population. We need a solution for ALL people.
As for the... "way to do something" and... "don't leave them behind", I'd call that solution
Basic Income. If we secure both base necessities and roofs over people's heads, then !@#$ the jobs market. It can do whatever it wants, the safety net will (can and should) deal with the fallout. Economic and Housing security for our entire population is how we deal with the evolution of Capitalism and how we leave no American behind.
We can readily protect our people and give them hope for a better future. The difficult part is choosing to do it.