It was a lot of work. You had to dig a trench to bedrock all the way around your base, then line the edges of it several blocks deep with something to slow the zombies down (barbed wire, or, my preference, water) because otherwise they'd run off the edge before figuring out it was an edge. You also needed to have corridors in at least the 4 cardinal directions, since they wouldn't path all the way around. There were still a few that would fling themselves into the depths, but the vast majority of them would cross the bridges you built into your base.
Here's one of my bases from A16 (it wasn't finished at this point.)
View attachment 2375
The trench was made by splitting it up into 3X5 sections (since the trench was 5 wide) and then undercutting it. My first attempt to do this was me cutting out a 51 X 51 section and then undercutting it, and it didn't collapse at all...that was really annoying.