Besides previously suggested terms also consider pet (“To stroke or fondle (another person) amorously”), although that may have more-amorous overtones than you desire; and pat (“To (gently) tap the flat of one's hand on a person or thing”), as suggested by Trish Rempel in a comment.
You write, “I thought "goose" would be suitable, but Wiktionary says that's for sharply poking or pinching, which isn't the case here.” Yes, wiktionary says “(slang) To sharply poke or pinch someone's buttocks. Derived from a goose's inclination to bite at a retreating intruder's hindquarters.” This is in accord with FumbleFingers's remark, “Goose is usually equally unwanted, but doesn't always carry such strong sexual overtones [as groping]” and with J.R.'s, “A goose is pinch or grab, usually surprising and unexpected; whether or not it's welcomed or unwanted would depend on who was doing it, and the relationship between the gooser and the goosed.”
You write, “Would "fondle" or "caress" be suitable, or is that more associated with sex?” For fondle wiktionary offers two senses, “To touch or stroke lovingly [eg] Mothers fondle their babies” and “To grasp [eg] The lovers fondled each other”. I've always thought of fondle in the former sense, and was unaware of its “To grasp” sense until now, so would not have assigned such overt sexual overtones to it. Wiktionary also offers several senses for caress, including “To touch or kiss lovingly; to fondle [eg] She loves being caressed by her boyfriend” and “To show and act on deep closeness shared with another person”. I think caress in the latter sense probably is the best word here.
The reference is from the Sergio Leone western 'The good, the bad and the ugly'.
First, as we are the eternal pedants here, it should be remembered that the Italian title was 'Il buono, il brutto, il cattivo'. Now, I'm not going to claim to be a fluent Italian speaker but that's not quite the same thing at all - see here.
However, it's the English translation that has gained traction as an expression. So, in the context of the film:
The Good: The Man with No Name. The hero played by Clint Eastwood
The Bad: Angel Eyes. The bad guy, a killer played by Lee Van Cleef
The Ugly: Tuco. Played by Eli Wallach, certainly no good guy, a crook and probably a nasty piece of work, but a sympathetic character, a likable rogue and comic relief. Probably redeemable in the end.
And that 'lesser evil' is, I think, the key to this usage.
Going back to the OP's context, one of software (an area where I'm on firmer ground), this trinity works well, it's something that we often see:
- Good code, that we all aspire to, well written, well documented and
error-free;
- Bad code, that either doesn't work or causes more problems than it solves; and
- Ugly code, the hurried hack that fixes the problem and gets rolled out to meet time and budget but that no-one is proud of.
There's a lot of ugly code out there
Best Answer
The best way to say this is probably:
This only implies that the listener is more inclined to trust "him" than you are.
This is not the exact same thing as "the benefit of the doubt", which implies that while something bad did - at least probably - happen, one assumes the the explanation involving the least malice - until proven otherwise. This doesn't always mean that you don't believe that someone did anything wrong, it can also mean that you assume they either made a mistake, or had a good reason/explanation. The concept can entail "trusting", "forgiving", and/or "understanding".
In this situation the best word depends on the exact circumstance. For instance, suppose a manager at a grocery store sees an employee eating some food. A trusting manager will assume they paid for it, and not bother asking. An understanding manager will say something such as "I had better not find out you didn't pay for that" in a pointed tone, giving the person a chance to go pay for it now if they had not. A forgiving manager will find out for certain, but only give the person a warning "you had better not do that again".
All of those cases are giving "the benefit of the doubt" to a differing degree. Otherwise the manager would check the cameras, and either know the employee was innocent - or fire them.