> In Germany the default for contracts is that you need your employers permission to do side projects.
You generally need to notify your employer if you take on a second (paid) job. The employer may veto that employment, but must specify a good reason (you can't be in competition, exceed the total legal working hours, bring ill repute to your employer, ...), but the default is "allow". Clauses that require approval are generally not enforceable. As always, there are exceptions depending on the exact circumstances. See for example this discussion (in german) https://www.haufe.de/personal/arbeitsrecht/top-thema-nebenbe...
You generally don't need permission to do open source work, though the ownership of inventions that qualify under the ArbnErfG may fall to the employer. As such, it's good to get clarification and explicit approval from your employer beforehands.
(not legal advice, ...)
German labor courts are most of the time well aware of the power imbalance between employer and employee. Even we, as a tiny company could bring more legal resources and funds to bear than most of our employees. So courts usually favor the employee.
Given that, I'd expect that the result would largely depend on how bad the infraction rates. If you failed to report a job that the employer could not have vetoed on any grounds, I'd generally expect a slap on the wrist (Abmahnung, "written warning") or such as the result. Worst case regular termination. On cases where the employee failed to report a side job that could or would have been vetoed, immediate termination with cause is possible - the link I posted above cites such a case. If the side job caused damages, suing for damages would be possible. However, suing for damages requires you to prove damages, which will be hard in many cases.
So I'd really recommend that as an employee you dutifully report when you plan to take on a second job - just be sure to phrase it as such: Don't make it a request. It's a notice.
Also, a second job is one thing. What about ownership of things you produce in your spare time? I don't think the former necessarily covers the latter.
The law is as the law is and the law is clear: Without good reason, no employer can forbid you taking on a second job. Now, employers pulling shenanigans in their employment contracts is not entirely uncommon - either due to lack of knowledge or trying to intimidate their employees. That's why it's good to know to have a general idea what the law says - because the law trumps the contract.
> What about ownership of things you produce in your spare time? I don't think the former necessarily covers the latter.
No, it doesn't. This is covered by the ArbnErfG (Gesetze über Arbeitnehmererfindungen) https://www.gesetze-im-internet.de/arbnerfg/index.html#BJNR0...
In a very short and inaccurate summary: Your employer can claim inventions that cross a certain threshold that are related to your work. You're entitled to compensation. Your employer can also claim a (nonexclusive) license for inventions that do not relate to your job, but relate to any of their areas of business under fair and reasonable terms (in doubt, a court gets to decide). You must notify your employer of any such invention.
Obviously, trade secrets or code that your employer owns the copyrights for is off limits for any of your spare time work.
If your second job leads to the total of your work taking up more than 48 hours per week, your employer can forbid it. Likewise if you work in your holidays.
I don't think it is as straightforward as you make it sound.
But funny how you choose to believe his personal experience, rather than mine. All hail the narrative.