Being a bit of a lazy sod I don't take my belt off unless told to do so therefore I set the alarm off at some security checks and end up getting frisked. Without knowing how thorough it should be carried out I wouldn't know if they were being too familiar for all the wrong reasons or not. However I suspect putting their fingers down inside peoples underwear is definitely not part of the training.
If you felt uncomfortable you were right to complain.