The only reasons allowed for border searches are ensuring that individuals are legally admitted (inapplicable here because citizens are always legally entitled to enter) and preventing contraband from entering.
A wiped phone can't contain contraband, so wiping the phone serves the same purpose as a search. It's not destroying evidence anymore than throwing away a water bottle before going through TSA is destroying evidence.
And it's impossible to ignore that context. This is plainly wrong. And people trying to justify this plainly fascist search is sickening.