If now only everyone who is talented at crafting software (or any other job that might be replaced), but who is out of a job could magically be as talented at something else, and enjoy doing that other work, then we would have no problem. But one issue is, that often significant time goes into becoming good at what one does. Switching has a very high personal cost in terms of time and having no income for a prolonged time.
Even worse, people are not the same as when they were younger. They may have less ability to learn. Almost certainly they have lower internal motivation and enthusiasm, since their career of choice was just taken from them. Job retraining programs are probably a big hint here. They have a poor track record.