I'm pretty sure Sweden has quite good ways to analyse it. For example Finnish immigration office buys services from Swedish company that is specialised in analysis language and they can tell if someone speaks language from certain area. So yes lot of the blatant lying is going to get caught. It's not going to catch everyone but at least most of them will be caught.
There's ways to get clues where a person comes from; for example their teeth. Ideally put them in some sort of hold that is equal to the prisons in the country where they most likely hail from (the key is to prevent incentivizing this sort of behavior).
- - - Updated - - -
The problem is most countries won't accept legal deportations without documentation (ie if the US can't prove the person is an Iranian citizen Iran likely won't allow repatriation.)
No documents should mean immediate deportation to the closest unstable country. Fair is fair.
Probably just deport them back across their southern border (germany) and then build the wall. Well... the germans do know how to get around a wall. Just ask the French.
FOMO: "Fear Of Missing Out", also commonly known as people with a mental issue of managing time and activities, many expecting others to fit into their schedule so they don't miss out on things to come. If FOMO becomes a problem for you, do seek help, it can be a very unhealthy lifestyle..
I’ll criticize any nations reasons for denying entry. That said as long as it’s a democracy it should be up to that nation.
Milli Vanilli, Bigger than Elvis
As already said it is very common for asylum seekers to not have any documents. They often get prosecuted for what they are and is written in their documents.
How the immigration office in the appropriate country handles this situation is up to them. Here in Germany and most of western europe every individual case has to be reviewed. That worked fine for decades, but then there were a few thousand paperless immigrants per year, and not millions.
Obviously without any paper to back them up is simply breaks down to what the official thinks. And since constitutional states have the basic of "in doubt for the accused" it would be the official who has to prove that the migrant is not from the country he says he comes from, and not vice versa.
And yes, that simply breaks down to using the rights and liberties we are proud of and what keeps us apart from the shithole countries they are fleeing from against us, making "no documents" a very effective way of illegally cheat your way to asylum.
But who can blame them when the legal way has a 0% chance of success?