You’ll be charged, but will they be able to get a conviction?

The charges are the punishment. You are imprisoned, risk losing your career, risk losing reputation, and still have to hire a lawyer. The costs are incredibly asymmetric. This leads to the majority of people complying, which only emboldens the state.