Okay. Now I know what to plan against. ;) Just kidding, I wouldn't use information like that.
This would be a jail, since jails are the ones the usually use chain gangs. I don't think there will be an Anti-Magic Field. That would be expensive and beyond the scope of what a low level prison would need. Most likely, they would train the guards to resist mental magic, via the Iron Will feat. I do want the breakout to require planning over a decent period of time, maybe a level. I want the breakout to feel like a major accomplishment for the group that will bring them together even after the breakout, even evil can have loyalty.
I don't even think that high-level, long term, maximum prisons would even be a thing, at least on a large scale. Unless you really need to keep someone alive for some reason, nothing good comes from keeping the captured evil Dragon Disciple confined at all times.If he breaks loose, all hell could be unleashed. I guess you could make a case for neutral people, but even then, I can imagine they would have a rather liberal use for the death penalty or just letting it slide.