Yes. It was always about economic realities.
In this specific case your correct. Machines would have replaced slaves, just as machines have replaced assembly line workers.