setting aside that earth bending jailers is an option. all the armies are primarily composed of non-benders. catapults, ballista, and other high power weaponry is available.
preventing tunneling is just a matter of proper surveying. it's just not possible to tunnel through certain ground.