"Locking down" is almost always a bad approach when it comes to border crossings. You have very little rights at the border, so keeping your phone locked and refusing to divulge the 20 characters password isn't really an option. Even without the threat of detaining you, they can refuse entry (if you're not a citizen/permanent resident), or seize your $1000 phone/laptop. Far better to wipe your phone and restore from…
I use the he.net app for TOTP. Will I get those back in working order?
I have a billion photos I want to keep — were they properly backed up to iCloud?
My mail settings are a pita to recreate. Will those come back?
Are passwords stored in the Secure Enclave? Could I lose those?
When I sign back into iCloud am I going to be able to use a username and password, or is it going to require me to approve the login on my laptop — which I left at home — as a second factor?
WhatsApp, Signal — how much is tied to my physical phone and/or any key material unique to the OS — material that is irretrievably lost, by design, when it is wiped.
I think really the long term answer is to stop using an opaque, closed source iPhone. Maybe some time in the next five years one will emerge that competes with Apple’s quality? Until then, every border crossing is going to risk handing over a huge part of my life to ICE because I can’t risk losing anything in a backup/restore hysteresis loop.
Post.: Another future direction would be for iOS and apps to recognise this as a common use case and provide guarantees about what is and what isn’t restorable after a wipe.
There’s also a conflict here between wiping data so that it is irretrievable and wiping data to later retrieve it. If you wipe with the intent to retrieve I can believe that immigration will just detain you until you restore your phone so that it can be searched.