dry moat outside a city wall, dry ditch
堭 centers on a dry defensive trench outside a city wall: a dry moat or ditch that serves as a barrier.
堭 combines 土 (earth) with 皇, which likely contributes the sound. The character refers to an earthen dry moat or ditch.
The left side 土 is earth, and the right side 皇 suggests something grand. Picture a grand earthen trench dug outside a city wall: a dry moat.
For オウ, imagine an old king (王, おう) ordering the digging of a dry moat: 王 -> オウ, and the earth 土 is piled up beside the grand 皇 trench.