Some traditional grammarians would try to convince you that it is wrong to use the form object pronoun + gerund (e.g. “him doing”) when referring to the action itself, not to the person. For example, we are supposed to say
instead of
The fact is, the latter form is much more common in practice. There are even many native speakers who never use the possessive form at all. The sad thing is that, although the latter form is so widespread it can hardly be considered wrong, it is still often marked as an error by teachers of English as a second language, so you may want to avoid it in tests and examinations.
For example, I found a page with English “grammar tips” (which I intentionally don’t cite, because I disagree with it completely) that gives, among others, the following examples of “grammatically incorrect” sentences:
They objected to the youngest girl being given the command position.
We were all sorry about Jane losing her parents like that.
and suggests the following form is the only correct one:
They objected to the youngest girl’s being given the command position.
We were all sorry about Jane’s losing her parents like that.
Let’s be honest—that’s not very good advice. The first sentence might sound rather outdated or overly formal in spoken English, but using possessive pronouns in this way is still quite widespread in literature. However, the second sentence would almost surely be misunderstood as “several girls being given the command position” rather than “one girl’s being given …” if it were spoken rather than written, and most English speakers would consider the second and the third sentence unnatural.
The point is, it makes little sense to argue that a variant that is virtually non-existent in practice and may even cause misunderstanding is the only correct one.
I believe you can use the “him doing” form in your speaking without having to worry about saying something incorrect. You can also avoid the construction altogether in formal written contexts and simply rewrite your sentences in a different way if you are afraid of sounding too colloquial. However, pay attention to the case when the “-ing” word is in fact a noun in its own right and not an action done by someone; then only “his doing” makes sense: