Quite. Invoking a self-destruct mode within sight of whatever cop wants the data is a Bad Idea. There's room to argue whether this is how it ought to be, but this is currently how it is. Don't wipe your phone after being asked to hand it over, unless you KNOW it contains data that will get you (or others you care about) in more trouble than a 'destruction of evidence' charge, or unless you want to make an expensive stand on principle. There are legitimate folks who live in that gray area: political dissidents under hostile regimes, some whistleblowers and journalists, abortion patients in societies where it's "health care" on one side of an arbitrary line and "murder" on the other, etc.
Might get away with it if the destruction doesn't follow from a specific action taken after access has been demanded, such as:
1) configuring a 'wipe after n bad passwords' setting
2) setting a duress-wipe code and writing it on a post-it, but not entering it, hoping the cops try it
3) setting a duress code/fingerprint that reboots but doesn't wipe -- that makes recovery much harder, but under the current framework, this might lead to a legal battle over whether crypto keys in RAM are "evidence" subject to "destruction."
I'd rather enjoy reading the court proceedings over any of those options, but I'd not enjoy it enough to be party to said proceedings.
GrapheneOS has an 'idle reboot' function like the iOS feature at issue here, and it's unknown whether there are any similar vulnerabilities in that. People should probably turn it on, it's more likely to protect than to harm.
I think probably the best advice is, for those worried about non-criminal personal data while traveling, take a travel phone and access your data over a VPN when it's safe. For criminals, maybe leave your phone home while doing crimes and don't store evidence on it.