Anecdotally, my best experiences have been with older programmers. I worked with a guy in his 60s who had some absolutely incredible personal stories to tell (he hitchhiked from Europe to India in the 70s...) but also a wealth of previous knowledge from his decades in the industry. He'd seen a lot, but still had an attitude to learninng (he was writing node.js, ES2020, all the modern gubbins, promises, maps, etc).
I think it's more to do with you as a person. Are you willing to keep studying and learning for the rest of your career? Even if you're not, there will probably be a slew of jobs that are fine for someone who has already "peaked".
TL;DR: I don't believe so