I know this won't be popular but I will ask it anyway.
How is searching a phone any different than customs searching all luggage inbound to the US. How are the contents of digital devices considered to be sufficiently different that they don't warrant a cursory scan, if not automatic scan?
Then it comes down to, what exactly could you scan for anyway? Could they do short term scan/records and delete upon leaving the country or short duration? Where is the justification for doing this to citizens of this country or countries not considered to an active threat?