Maybe rather than telling everyone to "learn to code" we could have told them to do jobs they are more suited to doing: serving food, nursing, construction etc. all which have tangible benefits to society.
When I went to Japan, it felt like all kinds of people were doing all kinds of jobs many hours into the day, whether it is managing an arcade, selling tickets at the station, working at a konbini or whatever small job. Maybe we need to not give such lofty ideas to the new generation and represent blue collar jobs as "foreigner" or "failure" jobs.
For that to work, we would first need to make those blue collar jobs into ones that actually pay well enough for people to thrive instead of merely survive