Automating software development is not unethical. The unethical bit is allowing resource flow default to those who own the means of production.
As a software developer, when I automate someone's job, say of a cashier, I do not start to get paid their salary - my salary stays the same.
This is different for capital investors and shareholders. They keep the cashier's salary (not directly but ultimately). This results in an increasing concentration of wealth, creates lots of suffering and destabilises the world. That is where it is unethical.