I think there is something here.
While software developers get better with time (and if you're smart that never stops), the need for people with 25 years of experience is minimal. Assuming that they've kept up to date, those people will do a job better than someone with 10 years experience, but probably not massively and probably not enough to warrant a higher salary. After all, a bulk of commercial software development simply isn't that difficult - it's CRUD apps, data processing and automating dull repetitive jobs in a way that saves money.
I think part of the skill with staying employed as you get older is to ensure that you aren't simply looking for work which justifies your massive experience as if you do you're going to be fishing in a very small pool. You need to accept that some (maybe not all but certainly a lot) of the work you're going to do is work that could be being done by a less experienced developer and adjust expectations (including salary) accordingly.