If you initiate a wipe before approaching immigration, which swaps the whole phone contents to an encrypted backup that you physically can't decrypt without a key that (say) a friend knows. Then you would be offering immigration the device in an unaltered state between when they request it and when they receive it. Any request for an alternative pass code or whether the pass code given will alter the state of the dev…
Then it could last a lot longer. Technically they don't have the right to do that, but you won't have any physical mean to enforce your rights, and suing afterwards won't lead you anywhere in the current climate.
We'e had a few of these stories in HN before.