Travel with a burner, wipe it before boarding . If at any time my phone has been removed from my possession, when I arrive back at my home port/airport, I remove the SIM and drop the phone in the garbage.
Laptops I mail the encrypted drive back home and travel with a clean install on a disposable 128/256g drive.
I prefer to send electronics to e-waste recycling (or reuse for some task where security doesn't matter) rather than a landfill, but I'm with you in principle: If the authorities get it out of your possession, the hardware is compromised.