You are ignoring the raw resource costs. The raw resource costs of humans is very low, it is really hard for early machines to compete with that, burning wheat in a machine instead of feeding more humans is really wasteful.
Its only when you put enforce minimum standards for all humans that humans starts to cost, and its only when you start to dig up fossil fuels that you start to have excess energy for your machines compared to feeding humans. Without those two the natural resource cost of machines is immense relative other things.