I actually think Cameron's response to the migration crisis was the correct one. Support the establishment and proper funding of camps near affected areas, so that people can stay near their homelands and return/rebuild once the conflict is over.
Otherwise you end up with a situation where anyone who can afford to leave permanently, will - in other words, your entire professional class decamps to other countries. And once they're settled in other countries, they won't come back.
One of the longest-lasting consequences of conflict is that the civic infrastructure degrades. That is to say, doctors, nurses, civil servants, administrators - people who get things organised and done - leave and don't come back. So you end up with a massive skills gap when you try and rebuild a government and civil society. Then it's easy for tyranny to slip in via the back door, simply because people don't know how to organise a functioning society that people want to pitch in with, so they have to use force.
Supporting refugee camps nearby is a much more clear-sighted, pragmatic and ultimately helpful thing to do than any amount of sentimental open-border posturing. Merkel's decision to open the German borders actually increased the risk of more children dying at sea, because it sent a message that if you risked the journey and survived, you'd be allowed to stay in Germany. So more kids were risked, and no doubt more have drowned. That's squarely on Merkel's shoulders.
Not that this has anything to do with the EU as such, and it doesn't really have much to do with my desire to leave. That's about democracy, and ultimately about how we want to meet globalisation. Do we want to face globalisation as one single region in a technocratic superstate that has repeatedly demonstrated its contempt for the wishes of ordinary people? Or do we want to face globalisation as part of a sovereign nation that, for all the flaws in its political system, elects its leaders and can kick them out if they don't deliver on their promises?