A Belarusian friend asked me this, but I can't find anything on my own. Protesters in Belarus are beaten once arrested until they give up the pin code to the phone.
So, if he could give a pin code that would immediately trigger phone reset to factory settings, or erase data, or even show a dummy profile, that would at least protect their family and contacts and limit the extent of accusations.
It would be nice if the phone could be used afterwords. Protesters may be given their belongings back after detention, and having a working phone is an advantage if they land in a hospital or just outside the detention center with none to pick them up.
So far I suspect that to have this functionality one has to fork Android or LineageOS. Is there already such a fork?
Why Android? Because back in Belarus, iPhone is much less popular than in the US or EU.
*2767*3855#
if it works (given that all codes don't work on all devices). You could Google for your device specific codes. Phone will be usable but all data would be lost and you would need to set it up again//But this is not a PIN code as you are asking. This needs to be dialled from your key pad after opening the phone