If the company these two were working for had a "plan" much like building documents, or a scope of work document/contract then there should be no reason for these guys to get in trouble as physical penetration testing would be listed.
I see two possibilities.
1) Company did not have a good scope of work, which at the end of it all this should fall on them and not the employees in charge of performing their work. These guys should be let go, compensation to them paid from the employer for their error, and said employer has to pay everything, including fees and having their reputation tarnished.
2) There was bad miscommunication. There was physical penetration listed in the scope of work, however the police were not informed and acted as they would with anyone breaking into a courthouse. This would then fall on the department who hired them, which should pay the employees for their time/trauma and make an apology exonerating the company who was hired to pen test.
A mistake or incompetence is no excuse for breaking the law. This was a courthouse. There is either CYA in writing they can request in discovery for that lawsuit or as evidence against the charges they face to demonstrate to a jury that they should be innocent or that an experienced prosecutor will see then look to drop charges.
But unless the charges are dropped, the jury favors the contractors, or the judge halts proceeding until a determination can be made, they may be SOL on the charges.