These days there are established procedures and protocols that prevent this.
And that doesn't really apply to the CBP and the CBP equivalents of other countries. They're ruthless and can lock you up in cages, there isn't really the opportunity to start a "case" until you're past the CBP. If you aren't a citizen you sadly don't have access to a lawyer if the CBP wants to hit you with a $5 wrench, because you aren't even in the US yet.
It took 7 years of sitting in jail to get the judge to watch the video and throw shit out.
This isn't a chess match between equals. This is someone who can ruin your life just to make a point. Even keeping you in custody for a day or three can screw up a lot of people.
The Lockpicking Lawyer put it pretty well recently. The people who make locks are following rules that nobody else is beholden to follow. The designer looks at the parts and thinks about their purpose. Their design. The picker is looking at what they can make the thing do, not what it's 'meant' to do.
They are repurposing things, to circumvent the wishes of the manufacture and the consumer. That's where the wrench comes in. That's where cloning the device comes in. That's where giving the adversary a fictional win to regain your liberty comes in.
Real life scenario:
https://www.yahoo.com/now/dutch-bitcoin-trader-suffers-bruta...
If they know you're hiding something, for certain, they'll go to much further lengths to find that out compared to suspecting you might be hiding something and finding some other stuff you'd obviously like to hide. If you've got an envelope with 100k in your pocket and you get mugged throw your wallet at the dude as quickly as possible and just book it - chances are that the mugger will either: A) consider the risk/reward at this point to be too dangerous since they've already got a nice bit of cash or B) assume you're just scared and have nothing else. If you say "Hey, I just threw you 200$, I'm going to run off with this 100k now" you're definitely not going to have a good day.