>that the government does so lawfully
There are many legal question in this case, it's not clear the government acted lawfully. If he'd have arrived in a different federal court district, the search was unlawful because precedent says they need reasonable suspicion.
Not to mention this was a pretext to gather warrantless evidence for the FBI for a domestic investigation and nothing to do with securing the border.
>Antagonising law enforcement in this situation is not a smart move
Not what he did.