Judge: "Hand over that phone right now"
You: "Sure, I can hand it over, but all data will then get wiped by the device automatically due to Google/Apple/Samsung's anti-theft design and I don't have a choice"
After that it's upto the Judge whether to proceed with the handover or not. It will be the judge who destroyed the data if so.
The primary motive of that design would be against thieves, but it would incidentally happen to work on judges as well. The owners of the phones would have no choice.
Yes, they could do that, and of course, in that case, my eyes would be on it and they would only be able to ask for things pertinent to the case, which likely means all corporate accounts, not dig through personal accounts.
Them being unable to take the actual device means that they'd have to play by the rules.
Destruction when handing to a mugger is still ok.