In law school we skipped border search cases because the border crosser cases can basically be summed up with “you have no right to privacy at the border.” This has been the common law for 5000 years. It has nothing to do with Trump, or cell phones, or anything other than the notion that a sovereign has an absolute right to know what is crossing its borders.
English Common Law hasn't existed for 5,000 years, which is what the American judicial system is based on.
unclear as to where you got this number
Not OP but generally states are considered to be a central political organization that maintains a monopoly on violence within a defined area.
The border is the thing that makes the state and have been since states first emerged about 5,000 years ago. If the state cannot preserve its border it is no longer a state.