Strip searches are by default degrading and dehumanizing. Ideally we should be working for a society and prison system where strip searches aren't necessary, but ultimately if we must have them they should be carried out in a way which respects the dignity of the person being searched as much as possible.
The prisoner's rationale is problematic, sure, but respecting his right to bodily autonomy is more important than anything else here.
This is a trans rights point, btw! Trans people are frequently subjected to situations where they're being searched, much more so than cis people, and frequently are put in degrading situations like this. They deserve respect and choice in strip searches as well.
The inmate bleeding to death on a cell floor from being knifed with an inmate-made edged weapon might disagree with you.
Not really sure how the identity of potential strip searchers matters here! Surely prisons have more than one guard capable of doing this work--and if they don't, they should.