To get a warrant in the United States, a law enforcement officer or government attorney must write a sworn statement called an affidavit showing probable cause, present it to a neutral judge or magistrate, and have the judge sign the specific order.
not necessarily in cases of harmful intent, you have the luxury of this time period
and also, allowing data deletion just also provides these people with a very easy to exploit loophole before even the warrant comes
I am not saying every citizen who goes to the border should have their phones checked, the phone checking happens when there is a cause for alarm or when there is a suspicion, at such times, this privilege to delete data can have very disastrous consequences
and yes, if it was a situation like this, i would hand over my diary if i was innocent