I have a better idea. I don’t think this would be tricky for mobile OS makers to build in: give people the ability to set up an “emergency PIN” and when that PIN is entered it wipes all data from the phone. This would work when you are under duress, whether they’re asking you to enter a PIN or they’re asking you to reveal your PIN so they can enter it.
Mobiles already have remote wipe features, so I think this should be pretty easy to build in.
If you suspect you might be at risk, you should also turn off your device so that a PIN is required on startup and touch ID doesn’t work.