Privacy and security are important, but there should also be clear legal guidelines for such situations.

Clear legal guidelines for which country? Or, better yet, for which subdivision within said country?

anyone would think that wiping entire device than giving sneak peak about what is in the phone is 100% sus as hell