Would it be possible to construct a file/system encryption scheme where you have a read-write passcode and a read-only passcode? Such that when given the read-only passcode it would allow (legal/valid) searches by law enforcement, but not (easily) allow fabrication of evidence by planting incriminating files?
I suppose you could make it part of a signature scheme for files (file written by passcode X) so that your defense could point to the discrepancy in your favour.
Any backdoor made for law enforcement will eventually land in the hands of bad actors, and sometimes those backdoors will be used illegally by law enforcement.
It's a practical feature in general, to allow anyone to poke through your phone without installing/posting/reconfiguring anything, occasionally nice to have. Then again, it would also slightly increase the social normalcy of being able to ask to snoop through other people's phones.
So they can use the banking app to transfer money away from your account because that's not stored locally on your phone? Or to look at your private photos?
I suppose you could make it part of a signature scheme for files (file written by passcode X) so that your defense could point to the discrepancy in your favour.