If use of a phone app causes interruptions in class, you respond by setting rules in class such as "put your phones away". Otherwise, it's COMPLETELY outside the boundaries of the school.
The police shouldn't be involved unless a charge has been levied by someone (e.g. "this person took pictures without my permission"). Bringing them in did nothing to help the children, it only further increased exposure. Oh, great: the police are going to "try to identify" the children in the naked pictures; well, how, exactly, without making the situation far worse for everyone?
Parents need to be parents. Train children about the risks of trading pictures or anything else of a personal nature (pictures are not guaranteed to be seen only by the person you send them to, pictures can be used as blackmail, etc.). Show kids why they should think twice before doing these things. And yes, commend them for the sensible steps that were taken, e.g. guarding things behind a password instead of leaving them completely in the open.