I suspect that if a young ambitious person started their training tomorrow it might actually work out ok for them.
The graphic in the post above shows US retirements peaking in 2024, I imagine the demographics are fairly similar globally.
The airlines are going to have to try and keep their experienced Captains within their Airline as other Airlines try to lure them away over the next 5-10 years with bigger money and better rosters. When the numbers are crunched I am guessing that providing roster flexibility will be more cost effective than offering larger salaries. That’s my guess based on the fact that I would happily take a 10% pay cut to get another two days off per month, or even a 20% pay cut to get an extra 4 days off per month.