Building on a hill is a big risk in this game because zombies, unlike medieval knights will begin to burrow under your base compromising its structural integrity.
Even in Medieval Ages, this risk existed.
Greetings from France, I wiill use an historical French example here.
French most known firefighters unit is "Sapeurs pompiers de Paris" and is a military unit.
The term "sapeur" comes from the verb "saper" (to undermine).
Their initial job was to dig holes under enemy castle walls to make them collapse.
They were using wooden frames to secure the underground tunnel, then set the frames on fire, as the frames burned, the tunnel collapsed and so the castle wall.
On the opposite side, the same unit, called "pompiers" (firefighters), tried to exinguish the fire before the tunnel collapsed.
You have plenty examples of those techniques during the 100 year war (Great britain vs French).
You have also (by studying those castles) numerous tricks used to avoid such a fate.
How do I mess up with undermining zombies ? By designing at ground level a fortress, and underground a hardened base descending down to bedrock level with a XCOM base layout, and with a huge quantity of passive defenses and traps at all floors.
Not 100% safe, but keeps off most zombies.