Free of defects is the least of the problems. Doing what a customer wants is the major one. One could argue that customers will be able to write their code alone but they'll always have something else to do and will pay somebody to do it, exactly as for all the other parts of their business. On the other side maybe one wouldn't have to know one of the current programming languages, much like we don't have to know machine code nowadays. English and a good dose of perseverance could be enough.
Sounds similar to the arguments against self-driving: "Self-driving itself isn't the challenge. It is self-driving better than humans". AFAIK this is already possible at least under certain conditions or at certain roads.
As shown by this post, we're still discovering what's possible with the tools we have now.
Also, human programmers aren't amazing at writing defect free code.