Hm. Is there any way to prevent tunnels without shakedowns every night?
I have dog handlers patrolling around my cell blocks all night, and they've never thrown up anything but false alarms, but I've had two prisoners escape already.
1. Metal detectors are absolutely required. Put em at the entrances to the cell block and/or if you have some sort of mega cell block, put em at the entrances of places that generate tools like the canteen or workshop.
2. Dogs patrolling inside the cells blocks/rooms. Sure, they probably don't sniff out tools/weapons, but the can get the other contraband. Which leads to #3...
3. Policy of searching the cell and sending to solitary for any possible infraction. They lose their cell and it gets searched, which helps with the rotating...
4. Make sure to search and double search new/recently constructed cell blocks, just in case stuff got in before the metal detector chokepoints were set-up. And maybe that issue of stuff slipping past in construction material.
I've left the game running for hours and have had no escapes, barely any tunnels either, since they tend to be found quickly.
@Dogs patrolling outside/around the cell block, the chance for the patrol to be right over the tunnel while the prisoner is digging/passing through is very very very low. I don't think I've ever caught one like this. Basically your dog patrol probably can only sniff around 3 or 5 tunnel tiles at most.
Most tunnels would dig straight from the cell block to the fence/exit. Which means if your dog patrol circles around the cell or the whole prison, there is a minimum chance to find tunnels via dog. And even if you try to build it so that your dogs patrol between cell block to exit/perimeter, you'd have to do a lot of perimeter fence sorcery and what-not to try to control the likely tunnel paths, if they don't just decide to dig straight under anyways. Also, having to consider the fact that you are still running a prison and your prisoners still have needs. So you need a bit of extra real estate to implement this per cell block.