For me when looking at this we should distinguish what buldings were built as a part of "basic economy" buildings and what were built based on genuine AI decision.
As for well, the basic question is if there was indeed shortage of water. Probably yes, if you think that one well could not be enough.
One well could never be enough Also the well was built very early in the game and a well will have a production rate of 100% at the beginning but this will fall down as there is less water after some time. But to give some values I watched the replay again and opened all warehouse and the headquarter. After 4 hours, the time where I started to overrun them, Barbarians had about 250 wheat in in those buildings and 0 water. Empire had after 3 hours (there I was a bit faster because barbarians was the second game and I thought that this could be boring so I made a few mistakes like building no barrack) had 53 water and 280 wheat .... but there was the problem that no one needs bread or beer because no armor smithy no need for iron no need for ration and so on.
As the economy in those strategy games is mostly counting if one plays it a few times I also think that this basic economy should be extended. There were no problems with building material because vineyard and winery and so on were built early. I now think of something like this:
where for empire
building_economy is mainly what now is basic_economy, so
1 winery, 2 vineyards, 1 tavern, 1 sawmill, 1 stonemasons house, 1 barrack
and than basic_economy is
building_economy - 1 tavern, + 2 Inn, + 1 sawmill, + 1 mill, + 2 bakery, + 2 brewery, + 1 donkeyfarm, + 2 smelting_works, + 1 toolsmithy, + 1 weaponsmithy, + 1 armorsmithy, + 1 vineyard
and than extended_economy is
basic_economy + 1 Inn, + 2 mill, + 3 bakery, + 1 brewery, + 2 weaponsmithy, + 2 armorsmithy, + 4 smelting_works, + 1 sheepfarm, + 1 weaving_mill, + 1 vineyards, + 1 winery
That is mostly what I do every time .... if I have not forgotten something I never look at the stock, only for water, wheat and meat / fish and build up farm and piggery and well as needed (and found building spots on the map) to have enough of this.
I also think that with those values you have a normal ai, for weak ai reduce every needed count > 1 by 1 so only 1 smelting_works in basic_economy instead of 2 and so on and for very weak only build basic_economy and no extended_economy.
This should be at least enough for a strong ai and also give an option for weak and very weak ai.
Mines I would only add those needed for building material in building_economy, so 1 marble mine for empire and 1 crystalmine for atlanteans and the rest as needed (and found). So that the ai will not go from building_economy to basic_economy without needed mines but from basic to extended_economy without counting available mines.
- edit corrected a few counts