Where are you looking? I ask because ageism is definitely real in the industry, but it's not nearly as bad once you get away from SV and the the startup world. You may have better luck looking at traditional industries like banking/finance, manufacturing, and healthcare. These fields employ a surprising number of programmers.
I have a friend in his late 20s and he had trouble getting a job - took him about a year. He also has lots of experience at "good" companies such as Google.
Of course it could be your age/something you're doing - I don't want to deny your experience with the situation - but also sometimes things just don't work out.
I vouch what another comment said, take the consulting route. I've said this before, but in 2019 I've switched to consulting because I've wasted close to 6 months of that year applying to jobs. The hiring processes were that bad for me at the time. And I'm only in my 30s and didn't even have to consider any age bias.
Another practice is applying en masse, if you're not already doing that. I used to apply sequentially to jobs, picking only the best fit and going through the interview process one by one. A waste of time, bulk apply to dozen of job listing (and directly to companies) and pick the first company that throws in an offer (and which also seems decent during the interview).
I'm in my mid-50s and while I'm definitely not a high-flyer, I've found work for the last 15 years as an FTE of state gov't in the U.S. I've had friends who've been let go in the private sector as they passed 50, but government employers don't typically do such purges. It may not be easy to get into gov't service at your age, but it's worth a shot.
Also, I wonder you should create your own 'Ask HN' to uncover whether your approach to job finding may have flaws, since there are many older IT workers out there who are finding work.
I'm pretty close to that age, too, and getting work as a developer is certainly far from easy at our age... companies want young blood that's willing to work stupid hours.Fortunately for us, they write shit code, so...
The thing to sell is your experience. i.e. "consulting". The market is smaller, but the rates are higher, and the value you can deliver is orders of magnitude greater. That's a good thing (and a good feeling!) Nice to say, "I cost my client x, but I delivered 10x to them in cost-savings/profit."
Of course, its likely that I'm doing something else wrong as well.