Skill retooling would help to an extent, but one programmer today can do more work than 10 programmers could do 15 years ago, or maybe even 10 years ago. That trend isn't going away.
Look at Django. If you include the hundreds of open-source modules with everything from messaging to billing to social media already coded, you can string together web apps in an hour that would take whole teams months and months from scratch.
Within the next decade or two I'd estimate that programming will hit its peak employment and start to decline as more and more work is automated.
Perhaps, but consider how much of the world still isn't digital (entire industries). Most business isn't - way more money flows through meatspace. I also think there is a good chance VR or AR will create another economic boon comparable to the Internet within your time span.
And to be clear, there's still plenty of opportunity. Something like 3 billion people are supposed to come online in the next decade, there will be tremendous opportunities to create solutions for problems we can't fathom. But my point is those solutions can be implemented by a fraction of the programmers that used to be needed.
And while there will lag between VR becoming popular and its design process becoming automated as well, it will still happen.
I also don't think this is necessarily bad, I'm just trying to point out that the conventional wisdom of "if we send people to STEM fields we'll keep the traditional economy intact even with automation" is not a long-term solution. The logical end-result of current tech trends is you imagine something and it appears in front of you almost instantaneously, no coding required.
As others have said, raw creativity will take precedence over technical skills, and most realistically we'll need a basic income and severely reduced workweeks.
Look at Django. If you include the hundreds of open-source modules with everything from messaging to billing to social media already coded, you can string together web apps in an hour that would take whole teams months and months from scratch.
Within the next decade or two I'd estimate that programming will hit its peak employment and start to decline as more and more work is automated.