At best, in the near term (5-10 years), they'll automate the ability to generate moderate complexity classes and it'll be up to a human developer to piece them together into a workable application, likely having to tweak things to get it working (this is already possible now with varying degrees of success/utter failure, but it's steadily improving all the time). Additionally, developers do far more than just purely code. Ask any mature dev team and those who have no other competent skills outside of coding aren't considered good workers/teammates.
Now, in 10+ years, if progress continues as it has without a break in pace... Who knows? But I agree with you, by the time that happens with high complexity/high reliability for software development, numerous other job fields will have already become automated. This is why legislation needs to be made to plan for this inevitability. Whether that's thru UBI or some offshoot of it or even banning automation from replacing major job fields, it needs to be seriously discussed and acted upon before it's too little too late.