This is an interesting , and often heard, take. I wonder if its mainly a US thing? I fit this description but not had problems getting jobs, and know others in the same situation. None of us expect top dollar though, and we probably (hopefully ; ) ) give a vibe of "they might be older than me but more likely to be a help than a hindrance in my team" to managers.... Personally I think its short-sighted to dismiss those who shun / ignore leadership opportunities. There are many great experienced engineers who appear to be coasting but actually do keep up with skills, and are very productive with no drama. 20+ years experience makes you avoid blind alleys and over-complexity, deal well with messy legacy codebases, and learn some social skills along the way ;)
This is absolutely a US thing, but even so, if you're a nice person, you can get away with a lot more than if you're not. I have heard before that you can be a successful engineer if you are two of brilliant, affable, and diligent (pick any two). Just being nice goes a long way.
However, note that being a nice person combined with knowing your way around legacy codebases is a form of leadership in itself. Not one that we reward well, sadly, but if your colleagues have a chat with you (which they like to do anyway) and then save hours of work, that's leadership.