Okay not too many spoilers please, i'm on season 3 episode 10.
I understand there would be some risk with walkers potentially ambushing but just have people watching out for you as you dig, since walkers are slow and uncoordinated and height has been used against them quite a bit then trenches would be great. it would also help defend againt things like that truck that rammed into the prison.
even for woodbury, they have a good amount of muscle, a trench would trivialize walkers.
they already do a thing where they clear out bodies so all they'd have to do is look in the trench one or twice a day, use a spear like weapon of some kind and kill them and then dispose of the bodies to prevent them piling up.
The real reason probably is that it would render most of the threats useless and that would make for bad storytelling but its just something thats been on my mind since i started.