Slaves were cheaper than the early steam engines. As such even if you built a steam engine (I think historians have documented primitive ones that did work - but they were small, very low power, and inefficient) it wasn't clear that the effort to develop it into something better is worth the cost.