So programmers don't work on socially relevant or desirable problems, but on some relatively obscure scalability issue that exists only inside a few internet behemoths. They need soldiers, not wisdom.
With these employers dominating the marketplace, socially relevant innovations take a back seat. Society doesn't help either, as open source sadly isn't tax funded (because tax-fundedness is a pivotal privilige of the disfunctional political class).
So being a programmer often is (cor)related to the strength of youth, and youth ends at 40.
However, no craftsman worth his salt loses his abilities, instead he has experience about what works and what doesn't, and becomes more effective at what he does. He doesn't run trying to catch his own tail.
For example this guy here, at https://millcomputing.com/docs/execution/. What he and his team have done is a work of beauty and is the fruit of experience and intuition.
The young and the old work together.