Both his having and him having are correct, in my view. This is counter-intuitive as we are used to one case being considered correct and one incorrect in what otherwise appears to be a single grammatical construction.
But there is an explanation in the history of English which relates to the perennial argument about whether -ing words are adjectives or ...
So far as a I can tell, as a native English speaker, there is nothing strictly ungrammatical about either of your examples.
Some rudimentary research, however, has turned up the equally grammatical "due to his having....". This may be why "due to him having...." sounds wrong to you.