I'm not sure that's the full story. A lot of the well known companies that are accused of ageism will happily pay you 500k/year if you're worth it. The main issue is what "worth it" means.
As I'm getting older (I'm in my mid thirties, so not old at all by non-tech standards, but in tech all these articles say its the end of the road), I'm getting more cynical, more conservative, I value foresight over doing things quick and having them blow up in my face later. I've seen countless of projects fail, and I know why they failed. I see these things happening over and over and can't help but going "Gah! I told you so!".
The college kids think I'm just a cranky old man and don't listen, and usually jump to the next company before the shit they did explode, and I clean up after them.
Many companies don't value that (often because they think someone like me is just misguided or flat out wrong). The value in someone who "goes fast and break shit to ship an MVP blazingly fast" is very high in their eyes. They'll pay for that. If as you get older, you use your experience to just implement shit faster and faster, those companies will pay you a premium. Most people don't go that route as they get older though.
But there are companies that value things other than shipping shit fast, and those will happily pay good engineers in their 40s, 50s or more several hundred thousands no problem.
Of course, you have the issue of people who get older, don't keep up to date, let their experience go to waste, and then bitch no one wants to hire them.