This is terrifying, I had no idea this kind of practice is already in place! In Asia, so far I never got asked for my phone and equipment, but now I wonder what the best way is to handle this. Killing my phone and restoring after entering is one way, but for a laptop that's more annoying unless you live in the cloud. Might still be a good practice to have your devices in a state where you could easily wipe and restore them in no time.
If I randomly got asked to do that, to be honest, I would rather turn around and go back instead of taking the risk that they maybe find something out of my past that can get me intro troubles.
Don't travel with your primary devices or any devices with sensitive or even personal information on them - to any country ruled by totalitarian regimes, like China, Iran, Turkey, New Zealand, Canada, or the US...
Five eyes, nine eyes, fourteen eyes. Most probably 195 eyes, although perhaps they'll be split 3 or 4 ways instead of one unilateral bloc of pervasive government overreach consisting of every country on earth...
If I randomly got asked to do that, to be honest, I would rather turn around and go back instead of taking the risk that they maybe find something out of my past that can get me intro troubles.