The EFF wrote a white paper on the various legal and security implications of crossing the U.S. border with devices.
They have a section on secure deletion, which outlines the various pitfalls of this approach.
They point out that a factory re-set of an encrypted iOS device or Chromebook is more likely to be safe, since the encryption keys are stored on the "secure enclave" (in the case of iOS) or the TPM (Chromebooks). So, any data remaining on disk would be encrypted with this securely erased key, thus (probably) rendering this information unrecoverable, even if you unlock this wiped device at the border (probably).
The safe solution for sensitive work is to not cross the border with devices that contain, or have ever contained sensitive information.
I'm perfectly aware that this is a pain in the neck (it's also a pain in my neck, I also like to get work done when I'm traveling like everyone else).
This particular problem is going to require a legal, policy, and activist response. There is no cute hack to deal with physical coercion at the border. Until then, encrypting and uploading your data, then transiting customs with either no devices or an utterly clean (not wiped) device that has never touched sensitive info, is the best way to deal with this.