"Americans' constitutional rights shouldn't disappear at the border,"
One of two things will happen:
1. Customs inspection will be moved from US soil to foreign soil if it wasn't already there. There. Problem solved. Your constitutional right never disappeared at the border because you never crossed it.
2. You'll be asked to consent to search your device/property. Those that consent will be searched and allowed to go on their merry way if nothing is found. Those that don't consent will be redirected to holding pen where at minimum a lengthy process will commence to obtain a warrant. Best case, you lose a few hours, miss your connecting flight, and are now on a watch list for suspected activity which will increasingly delay future entrances. Worst case, you're never heard from again.