The concerning part of this is that he unlocked his phone. The Feds were certainly within their authority to stop someone they felt was involved in a crime, but I don’t believe you are obligated to unlock your phone for authorities unless they have a warrant. Kind of like when a cop pulls you over for speeding then asks to search your car, you don’t have to say yes, but a lot of people think it’s some sort of order, not a request. I’m no expert though.
If he was a US citizen he can’t be turned away at the border. Also still pretty sure a citizen has the right to refuse a search without a warrant.