Isn't one way to ensure your continuing relevance to avoid managerial positions? In my experience a lot of older people are less attractive employees because after 10 years of management their skills are very generic and hard to specify.
Managers who aren't technically illiterate suck, programmers who can't see beyond the scope of their own little fiefdom also suck. If you can marry disparate skills from a few different areas you can really work magic in the right position.