Is AI perhaps an opportunity for years of paid cleanup and re-design work that those of us who have dedicated decades to learning the craft of software engineering will be able to cash in on?
This will require companies to be able to survive for some time using the old code and to recognise the importance of cleaning up. Has this ever happened besides the Y2K fixes? Wouldn't it be much more likely that the companies will simply go under? Or that they will make a team that writes a completely new version of the code, somewhat like Mac OS X was a replacement of MacOS 9 and not a cleanup.
Success has many fathers, failure is an orphan.
Publications like the Economist or the WSJ that drive a lot of this hype among the investor and executive classes are loath to point out that their readers and owners are the proverbial emperor not wearing any clothes.
One of the benefits of tech unions (if they existed in any meaningful way) would be to point out where the emperor is naked in a way that is a bit harder to ignore than the kerfuffle that occurs inside hacker news threads or subreddits dedicated to experienced devs.