Maybe they could all visit the switch room before they are quarantined and then he will have to let them go.

However, there is a rider to that, the warden says, "If this is true"; how on earth is he going to confirm that?

In reality, I think there is no hope. For, whatever strategy they plan, the prisoner picker is the warden and he could go on picking the same guy, or the same ten or the same twenty two, but never ever twenty three.

methinks, the puzzle itself evadeth me!