Also you don't really need to track your hours when freelancing other than maybe for billing purposes so you really don't need to worry about hours anyway. Generally you are considered part-time self-employed when doing less than 18 hours per week.
Earning a bit on the side is really not an issue in Germany. In fact the combination of having a part time employed job and then doing freelancing is very popular.
What doesn't work is being full time employed at two companies but that would make no sense even if you could as you would earn much less and pay insane taxes.
Having the right and your employer agreeing to it isn't the same. Do you want people to go to the court if the employer denies it with the risk of losing the job?
Balancing taxes for fairness and innovation is quite tricky...
https://www.euronews.com/business/2024/04/01/wealth-inequali...