Your first version is perfectly grammatical.
Regarding the second version, it is also grammatical, and you can arguably write it with or without the apostrophe.
There are generally (at least) two possible gerundive constructions:
(a) Him participating is important.
(b) His participating is important.
To me, version (b) is simply an unnatural hypercorrection whereas version (a) is the version that speakers would naturally use prior to indoctrination with prescriptivist fallacy. However, if you would naturally use version (b)-- or if you believe in the prescriptivist fallacy that dictates that you "should" use version (b)-- then that would be an argument for putting the apostrophe.