I just looked it up for Germany, because I was pretty sure you had to hand over your phone, but it’s a bit more complex. If you wipe your phone before handing it over, and you do it to protect your employer, that would be „Strafvereitelung“ which is illegal. If you do it to also protect yourself because the data on the phone would incriminate you, too, that would be legal because you don’t have to help the state to prosecute you. Since you wiped it, it would be hard to prove why you wiped the phone. Apparently, the fact that you wiped the phone can be used as an indication of guilt against you though, because it means you have something you want to hide.
I’m not a lawyer though, so I’m happy to be corrected if my understanding is inaccurate.