Germany does guarantees free speech in article 5 of its constitution.
"Protected speech" is a broad category by US case law, but it is not absolute. Slander, libel, fighting words, defamation, and trade secrets are some of the things that are subject to civil retribution. "Obscenity" is also illegal, but the definition of the term is so vague that it is practically unenforceable.
But yes, a court marshal is a completely different matter. You're speech is restricted if you take steps to work for the government in any capacity. As is your legal channels.