First, let me say that I generally don't think the German refugee/migrant/immigrant crisis is fixable. I don't want to sound negative but the actions required would not be acceptable to most people.
There's an episode of Star Trek Voyager that I often think of....when pondering upon the German immigration crisis and the path taken by the German government.
The episode unfolds with the Voyager crew rescuing some distressed ship with people who think they are highly advanced.....much more than the Voyager crew. Yet every step of the way.....through every single scene.....the advanced society demonstrates that they really aren't that bright or clever, and that their own vision of themselves is "bloated". And sadly.....they can't recognize their lack of advancement.
When you go back to 2013 and view things starting up with increased migrant/refugee/immigrant numbers in Germany and the Berlin leadership trying to resolve the problem....it was like the society on the Voyager episode.....who kept thinking they were smart and clever, but they really weren't.
You have two totally separate issues. One is closing the door to prevent any further growth or re-emergence.....and the second is to resolve the mess already created and lessening it's impact.
So you look at issue one. You basically need a quorum existing in the German Bundestag that are willing to write a paragraph of the Basic Law (the Constitution). Instead of saying that everyone who enters Germany has a right to present a petition and ask for asylum or immigration.....you need to basically split this off.
Anyone wanting migrant-status or job-entry status....needs to enter his petition from his original country through the local German embassy. If it comes back "disapproved", then you don't need to waste time trekking into Germany. You need to be blunt....if you just show up and want to fill out paperwork in Germany and wait there.....then you as the polite German need to get the point across that no paperwork will be accepted in this method and you need to leave by tomorrow morning.
Then......you start to hinge this migrant-status on experience, job-skills, or university degree. You limit zero-experience people to just a couple thousand a year, and you know precisely how much they will cost you in the end.
For the German who wants to argue about vast open doors and just training people....ask the budget guys what it cost to train a guy who has zero background or job experience.....for three years. For one single guy, between the social-living costs and education costs....with shelter and language training required....it's probably in the neighborhood of 200,000 Euro. Ask the opposition guy who pays that million Euro for five single applicants?
Anyone wanting a war-time refugee visa....then the Germans need to establish some camps and have an idea that they will only handle X-thousand refugees, and there's a time-limit to this (probably 24 months). You offer shelter and basic aid. If the refugee visa goes to a full-status, then you hinge their entry to the next level to being law-abiding for five years. Anyone breaking the law or creating a nuisance of their situation.....get revoked and removed from society.
Writing this change to the Constitution? Almost impossible. Even if you write it.....various judges might attempt to stand in the way or you could have the EU courts play out some game.
Issue number two is the list of things to be viewed with the current group in Germany.
It helps to bulk up the police presence in Germany. It also helps to enforce laws on the books and ensure judges are carrying out their assigned duties.
If someone's criminal aspects are a problem....you need to remove them from society and send them home.
If someone's religion is hindering their adapting to Germany....you need to remove them from society and find a place where they would be happy.
If you got some guy who has visa papers and it's apparent that he has no real employment but seems to have cash.....then he's dealing in drugs, and you need to send him home.
There is a cost factor to every single thing that you do as a government, and you need to wise-up to realize how much it costs to allow just a hundred migrants to be sheltered and where the money has to come from.
Guys arrest for groping or sexual assault charges? Once you've determined some truth to the issue....you need to bring the guy into some special camp and just let him fill sand-bags and get reorientation training for several months. If he can't develop a different behavior.....he's in the wrong country and you need to just make that decision and live with it.
The bottom line is that it takes some effort to be a German, or to be a good guest of Germany. It's not rocket-science....if it were....then most Germans would be failed citizens. But it does take effort.