My brother is in the intelligence business and high up in DHS and actually involved with Southern Border Security.
So to address this CAN DHS search your phone without a warrant, yes. DO THEY???
You have to fit a certain profile. They do not just grab anyone’s phone and go through it.
Hang out in the desert in the hot sun for two hours, have a van load of water, and no reasonable explanation, yes, you’re likely to get your phone looked at. Is it to the letter of the 4th amendment? Nope. Should we be doing it? YUP! With constraint.
I know some will go all conspiracy theory on this. But terrorist do come across this boarder, and there is protocols in place and DHS Officers must document each case. Much like a sniper has to document why he shot an enemy.