I think the issue is that our laws and economy are not structured in a way that makes it likely for those gains to be distributed back to anyone other than the ultra wealthy. Not that I expect AI to take over most programming jobs anytime soon (or ever), but if it does, it would almost certainly happen long before society manages to agree on a system to distribute those gains back in a way that benefits the average person.