Comment One of the lucky ones writes... (Score 2) 123
I am 67. I work in a niche field (Colour calibration / measurement). I work on projects, but I also have my own R&D software which has been growing for the last 20 years or so. I write non-fancy C++ most of the time. If you can find a small-scale niche like this, possibly involving hardware, then it will have longer timescales.
I have recently made a phone app. If you can find something that needs doing on a phone, this is something that one person can do. Android has a good community, but huge variations in hardware. Apple is, well, Apple, but their builds are consistent.
I spent a year or more on AI. The small successes I had were easily overtaken by the others in the field. Everything is changing furiously. It usually requires huge databases and a hefty processor.
Good luck!