Put in a ramp so that zombies that fall in can walk back out. While a moat can be a good deterrent against human adversaries, it is a much less effective barrier against zombies. A sufficient number of zombies can easily fill up a moat given enough time. Even un-motivated zombies can fall in accidentally. If the goal is to prevent this from happening, then the easiest way to do this is to give the zombie a way to leave on their own. Depending on the moat design, a simple wooden ramp should provide an easy exit. While zombies are not particularly durable, the don't feel the pain of injuries and most that fall in should still be ambulatory enough to continue walking or crawling. If there is no stimulation drawing them to the castle, then they should eventually discover the ramp and wander away following some other sound or smell. 548
If you are lucky the geography around the castle might provide a convenient entry and exit for the zombies. For example, if zombies tend to always approach from one direction and fall in, you might put the ramp on the far side where they might walk up the ramp and tumble down a hill, unlikely to walk back up.
In addition, if you would like to speed the exit of the zombies you might provide incentives for them to keep moving and exit on their own. This of course may depend on the type and motivations of your zombies. For example, if the zombies in your land are attracted to sounds it should be a simple matter to place something that produces noise near the top of the ramp like a bell that would draw zombies in that direction. You could further rig it so that when a zombie walks on the ramp it rings the bell drawing the zombie forward and attracting more zombies from the moat towards the ramp. If the bell is not too loud you can avoid attracting zombies that are not already in the moat from further falling in.
Some zombies that fall in may become too damaged to leave on their own, but this number should be greatly reduced. Zombies that become damaged and stuck in the moat would likely be trampled and ground into the earth by the "healthy" zombies but since this number would be much smaller it would likely never fill the moat.
If a zombie hoard arrived, the trick is to keep them moving. When members of the hoard fall into the moat they should follow a route around the moat until they reach the ramp, and then climb the ramp and continue right on out the other side, or hopefully tumble down your hill and keep walking somewhere else. 548