The large majority of my career (26.5 yrs now of 35.5 yrs earning) has been as a very senior engineer with multiple patents at a very large formerly SV HQ company.
I never have seen age discrimination - in fact have productive colleges who are nearing 70 (I personally am a long way from even normal us retirement age still) both male and female and still learning and writing great code.
I just thought my anecdote could counter your more dour analysis- although despite that I agree with the heart of your message…
You have to love it to do it for a lifetime.
Also, AI is mostly Artificial and not so intelligent. I do not fear for your generation once management realizes that it isn’t all that.