"Wiping is obviously extremely suspicious and asking for trouble"
It's sad this is the default view. It's his device, his data, his life on that phone. If he had wiped the phone before the interrogation it wouldn't be a problem. How long before? A second before? A week before? But wiping the data a minute later is suddenly asking for trouble.
I don't like it and I wish we had more privacy, but realistically there is no such "right".
If you're going to be in a situation where you're in a room with some goons backed by the full power of the state, it is what it is.
Maybe because I'm not American I don't have any hangups about seeing the US government this way, but my own government is no different - you can (and people have) get stopped at Heathrow, taken to a dimly lit backroom and given a going over for hours
I don't know that there is case law on this but I imagine that "prior to the admissibility inspection" is likely to be treated differently from "during the admissibility inspection" or "during administrative detention or secondary inspection" (or "in response to a request or question by a border agent"!).
Edit: a bigger picture question is the difference between things that may be legally punishable and things that may cause suspicion from CBP agents, which aren't the same thing at all.
it seems to me that if you give them a password to unlock the phone and when it unlocks it has been wiped that will cause problems whether it is the password that causes the wiping or not?
A US citizen has an almost unlimited right to enter the USA. The border search rule permits officials to search for things that are illegal to import. A blank phone is not illegal to import.
A non-citizen who arrives with a blank phone might be denied entry because it seems suspicious.
well OK, luckily my checking of media informs me no citizens have been stopped and held in custody by immigration without due process or any particular grounds, especially recently, so it all sounds good.