It occurs to me to ask a question: why can the UN not deploy some of its staff in every country of passage, to provide a "refugee immigration clearing service"?
This would interview and classify each refugee, using the UN's resources to verify the claims and provide all the information required to the host country, which the refugee wishes to enter. Such a world wide service could be paid for by a levy on the immigration service of each member of the UN. The final decision on whether to grant entry would remain with the host country but the assessment would be based on the information provided by the UN.
Any person entering a country without permission would then have no grounds for appeal in the host country. It would be the right of the host to return the entrant to their original country without delay. At the same time, the host country would be able to speed up the entry of those applicants whose circumstances fitted the host's requirements. The resources currently being spent on illegal immigrants could then be put to more useful purposes.
Just a thought.