I am a middle aged dev, and I expect to become you. I expect that my skills will become less valuable over time, and that my age will limit my possibilities. To me, this isn't such a bad thing; it's something to prepare for. (saving up, diversifying my skill set, making and keeping long term friendships, etc.)
You always have the option of partnering with some Gen X'rs who have experience and integrity and building something, with them, that provides you all security.
Gen X were 20-something’s in the ‘90’s, that group is just hitting the ageism barrier themselves.
The problem is the massive influx of newcomers to the industry who have no experience and crow very loudly that experience doesn’t matter, or that their 6-week bootcamp is as good as a degree+decades of experience. Well the joke will be on them too one day, they are just too inexperienced to realise it.