In this specific case your correct. Machines would have replaced slaves, just as machines have replaced assembly line workers.
This was always coming. Slavery was going to go away no matter what. The real issue that caused the civil war has still not gone away (The NorthEast runs the nation for mostly it's own benefit) and is still with us today.
Nowadays we call it the "Swamp", or the "Deep State".