This is certainly not the first article of its kind, and the legality of such action seems to be upheld in court (at least the use of search without a warrant at the border). So, the selfish question then is: How do I protect myself from such unwarranted searches? Is there a way I can present my phone such that it drops into a mode that contains no data? Do I need to back my phone up before traveling, wipe it for the…
For laptops, you can install multiple operating systems and simply set the BIOS or EFI bootloader to boot the dummy one by default when going to the airport and make sure the dummy hides the partitions of the real one. Once again, this will fool manual inspection, but not computerized. Fooling computerized inspection would require placing the real encrypted file system within the dummy one, without any headers indicating that it's a file system: much more complicated and can lead to data loss if the dummy system writes over it.
Either way, you don't want to simply wipe everything and restore once you're across borders if you actually want to cross. For one, there's the chance they'll just confiscate your device, but if you're not a citizen of the country you're entering, they'll just deny you entry on suspicion. You want something that's fake, but convincing, which takes effort.