Starting from work with high personal contact and trust (waiting, teaching) which cannot be outsourced, you want to move to work that is highly-technical, highly-ageist, first in line for disruption, with high barriers to entry, and highly-competitive (where you can compete with programmers world-wide for a job)?
That's a recipe for soul-crushing long-term unemployment.
TBH journeyman computer work today is plumbing with tools that go stale fast, or perhaps making tools to do the same thing better with less.
By contrast, medicine is now the biggest employer, largely because it's difficult to automate that kind of personal touch, and b/c in the US the population is aging. While being a provider involves training & certification, there are a number of provider-adjacent jobs in logistics and related counseling (e.g., genetic counselors, IT) where you can use your people and explaining skills. All of medicine now is highly technical, so there's plenty to learn, and that knowledge is much more interesting and relevant than CS or programming.
I don’t disagree with your points, but the OP doesn’t necessarily seem to want a job in the tech industry; he just wants to learn interesting concepts and to build things:
> …not aimed towards landing a job as a software developer
Yes, I graduated with a CS degree at 37yo in 2021 and thankfully got in before the layoffs. My first advice would be dye your hair if it's turning gray and never tell anybody your age unless uou have to. Of course, your managers will know it anyway.