Is there any legal repercussions of separating the garbage incorrectly in Germany?
It depends.
The answer depends on several variables.
For example, if you are handling hazardous waste, extra regulations apply.
Residential
Considering your other most recent question you are/will be a renter.
When you rent a property in Germany, you do not have to subscribe to garbage collection and all the other stuff, no.
The legal obligation to subscribe to garbage collection and comply with the local sanitation statutes (Abfallsatzung) is usually put on the real estate owner (i. e. probably your landlord).
Just by owning property the property owner creates a risk (e. g. vermin accumulation) and thus has to face obligations (i. e. dispose stuff attracting vermin).
Besides, it’d be utter madness if the sanitation company had deal with individual tenants at the frequency rental agreements are concluded, say at a hotel, leave alone there are no means to “detect” rental agreements (there is no obligation to publicly announce or register rental contracts).
If the garbage man discovers improperly separated trash, the landowner will be fined.
The landowner has to pay the fine yet can sue the culprit for damages.
To that end rental agreements, in particular the rules of the house (Hausordnung), usually contain a clause:
“Tenants agree to act in accordance with local sanitation statutes.”
This contractually transfers the obligation of trash separation to you, the renter.
Such a contractual claim is easier to enforce than a tort claim.
So, while the fine is issued to the registered landowner, you may have to pay the fine in the end nonetheless.
In practice, your trash is not sifted through so the chances of being caught are minuscule.
If it is obviously not sorted, though, for a first‑time offense your trash simply isn’t collected and a memo “we didn’t pick up your trash today, because …” is attached.
Business
If you run a business, you should consult a lawyer.
The classification and sheer amount of trash may be associated with further obligations.
Government
There are no immediate legal consequences.
To me, it is not often very clear what type of garbage goes in what in Germany. […]
The trash categorization ordinance (AVV) categorizes trash.
The sanitation statutes reference these categories, how to properly dispose them and in particular states the fees per quantity.
If you are not sure, ask your local authority.