The ancients knew a lot. Also check out Petra, the capital of the Nabataeans.
https://en.m.wikipedia.org/wiki/Petra
These people were traders (capitalists) and built an incredible city in the desert. This was enabled by extremely efficient water harvesting (like in Dune) and by being extremely difficult to get to, making armies starve and die of thirst en route. It could be defended with a small force.