I disagree. If I recall correctly, slavery was becoming less important back in the very late 1700s until some guy named Whitney invented a particular machine called the cotton gin.I agree that mechanization of agriculture would eventually have ended slavery, by reducing the amount of farm labor necessary.
Actually no. The cotton gin made slave picked cotton profitable. Before the Whitney machine, cotton was carded(the process of removing seeds from the cotton bolls) by hand. It was labor intensive and kept the price of raw cotton very high. It could not compete with wool as a textile. The cotton gin made it possible for sugar cane and indigo plantations to switch to more profitable cotton, which increased the demand for slaves.
If modern economic principles were applied to a typical southern cotton plantation in the slave era, very few would be profitable. The fertility of land was quickly depleted, which reduced production and land value. If this loss of value were shown on a financial statement, it would put most plantations in the red. It would be no different than a gold mine with a depleted gold vein. It took more work to produce more gold, and with every bucket of ore removed, the mine's net worth dropped. This is the reason for the constant pressure to move plantations westward. The Atlantic states, especially South Carolina had come to terms with the loss of agricultural production. SC's surplus of trade came from selling slaves to the western states, not agricultural products. If slavery were abolished, the former slaves were not going anywhere. They would still be agriculture works, at least for the time being. The old unproductive eastern states would be economically devastated by loss of the slave trade.