Yes, but it was capitalism that ultimately destroyed slavery by making it uneconomic. Capitalism created the surplus wealth that allowed for the end of slavery, the end of child labor, the five day work week and the 8 hour work day. Thanks to capitalism we worry about obesity instead of famine. Destroy capitalism, which so many fools wish to do, and all the bad things of the pre-capitalist world will quickly return.
The only sustainable economy is one based on surplus, rather than on five year plans and regulations for the sake of regulations.