That's always going to be the problem. And taking a fully pragmatic view for a second, even if someone is genuinely fleeing persecution, once they get to a safe country and then do not apply for reguge because they see other countries further on as a softer touch, or a safe country where the benefits are better, they surely start to lose some of our empathy at that point.
If we're getting these people arriving at southern European shores, it's clearly not fair to expect all of those countries to bear the burden. So we should set up the ability to allocate families to countries at that point, and then we can say "Welcome to Europe, you and your family are being allocated to Denmark (for example) - here's the papers to fill in, and we will then arrange safe transport." Each country states the numbers they will accept, and anyone refusing safe refuge in the country allocated to them gets sent back.