Similar to Corys or Pitbull plecs, the ram filters the sand and moves it around. The plants keep oxygenating the substrate via their roots and therefore minimise anaerobic pockets.
Even if they do develop then the toxic substance (hydrogen Sulfide) is rendered harmless almost immediately it comes into contact with oxygen which as we know is plentiful in the water column otherwise the fish would not survive.
The only problem with anaerobic pockets is the smell if a large bubble comes out (rotten eggs. lol)
Kuhlis, Trumpet Snails, Corys, small plecs, Rams and many more will move the top layer and help this out but the more important thing is that by moving the substrate they are bringing the organic bits back into the water so that they can over time get into the filter.
My substrate sends a bubble up from time to time but it doesn't smell. I assume it oxygen from the roots that just gets trapped and when a fish's nose or snail interferes in the area then the bubble is released. My substrate has been in there since September 07!!! So it is now 16months old and I have no issues with it nor intend to replace it for a few years yet!!!
Aaron is better at chemistry than me so maybe he can explain how hydrogen sulfide is rendered harmless when it comes into contact with O. I just read things without understanding the whole of the theory but getting the answer to the questions I had.
AC