Water wont kill zombies, they'd just be stuck in the moat. The moat would fill up with them making it so you would soon be trapped in your castle with a single entry/exit point (the drawbridge) because the moat would be deadly for you to try and cross.
If anything happened where you guys needed to leave the castle, all the zombies would be huddled at your drawbridge... so you are basically sealling yourself in from the outside world if you decide to hold up in a castle.
Because of how the zombies in TWD work, anyone that dies inside the castle also turns.
This means any accidental or sudden death would result in walkers inside the castle in a situation where leaving the castle is basically suicide.
So as long as you don't need to go outside you've made it so you are basically 100% safe, but as soon as a threat is inside and you need to go outside... you've killed yourself.
It could work out or it could be a death trap. Its all luck once you select a place to hold up in with others.
The only way you are ever safe of zombies is if you are secluded and alone (meaning no one can turn). A sad existence.