That's a really common question, but destroying physical documents doesn't actually help them all that much. There's a really strict process for establishing identity and nationality when people arrive undocumented.
The first thing that happens is biometrics (taking fingerprints and facial photos). If that person has ever applied for a visa, been stopped at a border, or logged a footprint in any allied country's database, their real identity flags up immediately via international database sharing.
If that doesn't throw up anything, but the Home Office is still doubtful about their stated nationality, it can commission specialist language analysis. This would be a linguistic expert who would examine things like pronunciation, dialect and vocabulary to assess whether the person's speech is consistent with the country or region they claim to come from. In some languages this can provide quite specific evidence, although it's always considered alongside other evidence rather than being solely relied upon.
Also, the burden of proof is on the claimant, not the Home Office. Under UK immigration rules, if a claimant can't prove where they're from, the Home Office won't just accept their story. For eg, if they claim to be from a war zone but fail basic geography, cultural or regional knowledge tests during their interviews, their claim would be rejected on credibility grounds.
Border Force are also allowed to search their devices, and it's often things like geolocation, currency transactions, text messages, social media accounts etc that reveal their true country of origin and the other countries they travelled through.