Flat edges can be really difficult to get working, like if you want a sharp cut into the matrix to form the trench, matrices aren't really that much good - neither is the advanced terrain as it is (will be different with the commercial version).
You do have a couple of options for flat (flatter) walls though:
Memblock matrices could be used, they're faster than traditional matrices and you have exact control, like you could build the trench walls directly onto the mesh, with perfectly flat walls - this is not easy though, memblock meshes are tough enough to learn. There is a lot of code lying around for memblock matrices, try the codebase first if your interested in taking this route.
Exagerated depths and fake floors could work though, but your walls would be a little low res. What you do is drop the trench floor on a single row of points, as far down as you can. Like if your tiles are 100 units wide, drop the trench floor 1000 units down. Then if you position a plain under that matrix it forms a trench floor, you can texture this then scale the texture. This would be finicky, but possible with advanced terrains too. A downside is that your trench walls end up stretched, so it can look a but strange.
You could also model your terrains and add the trenches directly onto the mesh - can mean slower collision detection though because it sorta negates linear interpolation - which is how matrix and terrain ground height checks are nice and fast, with a mesh, you'd have to use object intersection checks.
It would probably be best to wait and see what the retail advanced terrain plugin brings, I think it has the ability to cut holes in your terrain, which would be ideal, you'd only need a trench mesh and you could stick it in place seamlessly.
Van-B
Muhahahahaha.