>There are lot cases where it is proven that you don't have any legal protection on border crossings.

Assuming "you" here refers to US citizens, there are actually no such cases, because it is not true that we don't have any legal protection at the border. Quite the contrary! There are certainly cases covering how certain protections are reduced, but that's a long way from nothing. Most importantly and foundational, all US citizens have an absolute right to return at a land border crossing, even without any form of ID or the like. You cannot be kept out. Without appropriate ID it may take longer to verify you and they can check. If there's probable cause for a crime, or an active warrant, then of course they can arrest you, but that process then plays out domestically same as if you'd been arrested at home. They can examine and seize physical goods with cause, but you can then challenge that and ultimately get it back. But they can't keep you out, whether you voluntarily cooperate or not, and they can't arrest you without all the same domestic legal justification and process.

I don't want to understate that the amount of trouble and financial challenge that in principle border patrol can impose/get away with can be substantial for a lot of people. Someone might be in a rush to catch some connecting leg of their journey, or have responsibilities at home/work that are time sensitive. Not everyone by a long shot can afford to be without their phone/notebook/equipment for days/weeks/months. Not everyone can afford serious legal representation and the resulting time sink. Etc etc. But even so ultimately we do have legal protections that we can all make use of and can stand upon.