All it takes to build a perfectly vertical wall is a stone hung on a string to make a plumb bob. All it takes to build a precisely level base for something as large as a pyramid is to dig a connected trench all around it and fill it with water. All it takes to keep underground miners digging laser straight for miles is two candles at the ends of a stick one or two meters in length – as long as the miners keep the light from the two candles merged into one, they can drill a perfectly straight tunnel for miles. All it takes to move multi-ton stones are levers, rollers, ropes and enough manpower. All it takes to crack off huge blocks of stone in a quarry are a line of fires to heat the stone, and then cold water to make it crack along the heated line.
We should be careful about assuming that peoples, ancient or modern, who have less technology than we do are necessarily less intelligent. It isn’t so.