I can't speak to the legality of how it was used in this case, but I do think stories like this make GrapheneOS (which works on Google Pixel phones) even more attractive to journalists and anyone who cares about civil liberties ...

Protester targeted by DOJ over phone-wiping ‘duress’ passcodeA security-focused mobile operating system, GrapheneOS, allows users to wipe their device with a “duress” passcodefreedom.press