A judge ordered him detained after agents said seized devices contained videos from a hidden gym bathroom.