People talk about administration as if it were a waste of money, but really most counselor's offices are glorified registrars and can't do any actual counseling (which is really one of the bigger problems.)
There's no magic bullet, and at a high level there's no substitute for more 1-on-1 instruction (and counseling is just a little more explicitly 1-on-1 targeted at kids that need it.)
In my country (which is not Germany), the big jump is at ~15. While elementary (1-4) and middle schools (5-8) are +/- the same, gymnasiums/high schools (9-12 or 9-10) do differ. For smart kids, 15 is the age to try to get into the elite profile schools in science or art. Or jump to an overall better school. And shitheads are encouraged to go to "main" 9-10 schools which are straight way to trade schools. Although majority of kids stay in mainstream schools and do what you described. But the system offers a way out for both smart kids troublemakers. Which is nice.
Personally I wish kids were more encouraged to aim for a better school at that age. I'm still salty I didn't even try to get into the elite schools since commute seemed too long. Although I did jump to a wee better (and closer) school to escape the overall attitude.
On the other hand, if shitheads-at-10yo stay on university route, they don't get good enough grades to get into university anyway. They'd probably be better off becoming electricians. Once they'd realise they do want education after all, then they could put in extra effort.
As a side effect, electrician-headed shitheads don't stop education-oriented kids from making progress. Which is nice too.