It’s possible that sufficiently advanced “dumb” compilers and tooling could lower demand. Or that the supply of developers outstripped demand - that’s happened in other professions. We always joked about how we’re automating our own jobs. We just happened to live in a period of explosive demand growth for our skill set so it never mattered for us. But it was never guaranteed that growth would continue in perpetuity.
When mentoring a freshly minted dev, I always checked whether or not they were open to career and financial advice. And if they were, I would always make this point to them and tell them to think carefully how much of their massive tech salary they should be spending. I make it a point to keep abreast of what median salaries are for other job roles are viable and moderate my spending and saving accordingly, because there was always a possibility that the gravy train would stop.