We immediately need a phone and laptop feature called "Border crossing mode". Once you can perhaps active anytime but only gets deactivated once you're physically in a predefined location.
All humans inside the US border have the fifth amendment right to remain silent, so handing over encryption passwords to the CBP is a choice.
Unfortunately, the 5th amendment doesn't apply in New Zealand - if you remain silent at a NZ airport while customs ask for your password, they will impose a $5000 fine on you. The only viable solution I see is to only travel to places that do have 5th amendment protection or similar (which would immediately rule out Britain, Ireland, Australia, and now NZ as well).