Unless you're highly specialized then you run out of options as you become an older programmer. The market size of "specialized programmers" is not even close enough to being the size needed to absorb programmers as they age.
I see things a lot differently now that I did 10 or 15 years ago. I no longer believe that a decade of experience in programming carries much value (as seen by an employer).
The aha moment for me was when I worked with a 26 yo trombone major who took a 3 month coding bootcamp who was showing nearly the same level of programming proficiency as me. And I wasn't a schmuck programmer.