This is one of the hardest part. Comes AFTER the internal Just Culture

Experience has shown that it is a waste of time talking to the judiciary when your internal Just Culture is not present. Judiciary will have no reasons to believe you when you claim the prosecutor has no role in keeping the company safe. 

But after you have established a good internal company Just Culture, you may rightly claim that random acts of the judiciary will destroy your Just Culture and with that your Safety Culture. So that is indeed a good time to talk to them. Never go in there alone, bring like minded people from similar or different industries with you. Take an example of the aviation sector, they have established good mechanisms!

Your ultimate goal would be to have the judiciary only act in case of 

  1. accidents: they will always reserve the right to investigate. Makes no sense to argue.
  2. gross negligence or willful misconduct.

Trouble is, of course, WHO will establish when nr. 2 is applicable? Right. That is where your internal Just Culture comes in.