On the other hand: if you steal a pair of shoes, and the police find them back in your home, they don't get to burn down your house after your conviction.
Given how much of our lives happens on smartphones these days, willfully destroying personal data which is not in any way related to the crime seems like extrajudicial and unusual punishment to me, and not something the police should be able to do without an explicit court order.
I don't think it should be allowed without a court order. Extrajudicial punishments are bad.
I do think a court order should have been issued in this case. The offender's conduct was severe enough to earn him 15 years in prison, and the risk of continuing/future harm to the victim was substantial.