It was not a body cavity search, but it did involve exposing his underwear while in public view.
This is not the first time a situation has been brought to the attention of The Powers that Be, and there are cases from several sate supreme courts as well as SCOTUS all agreeing that what was done went too far. The cops in this case will most likely be found to be in the position of being expected to have known that the level of intrusion into the privacy of the individual was too great to have been done in public, no matter how exigent the circumstances.
Unfortunately, there will be issues of limited soverign imunity to be overcome. In a case like this it should mostly be the matter of time and showing that the prior cases put the cops on notice, then the ruling that they are not entitled to that protection.
Sometimes it is a wonder how folks continue to do stupid. And then there are times when all you can do is look at them, shake your head and say "Well bless their hearts" and hope they get assigned chaperones for the rest of their lives.
stay safe.