The assumption is that orders of magnitude more people will benefit from the efficiency gains, like it was the case in agriculture automation or factory work automation.
In those cases, that led to a transition period, nowadays only a small fraction of the human population is working to produce food, and their job is more about planning, finance and orchestration of machine work, but many specialised jobs were lost or made miserable in the process.
IMHO any job that can be done by a machine should not be done by a human, the tricky part is going there with as little undesirable effects as possible.
All this skips the fundamental question: can this job be done by a machine? Or does the job just have a vaguely machine-doable look, particularly to those outside the trenches?
Because the latter is how you get the software engineering equivalent of collapsing bridges, en masse.