I think the use of the term junior and senior is a bit confusing because it conflates age and skill. I would say most people use it to talk about skill, because we're talking job titles here.
While age and skill are certainly linked, I have known several junior engineers well over 50 (don't hire these people!), and also some extremely skilled engineers in their very early 20s. The latter hadn't yet earned the "senior" job title but that's just because they didn't know they deserved it yet.
So yeah I do think junior (skill) programmers are pretty screwed - AI is already at least on par with the junior skill level people I've worked with. But I don't think that means young people are screwed, as long as you are good at your job.
For now anyway. Who knows how good AI will be in 5 years. We might all be out of a job.