All things being equal, a heavier pistol will have less felt-recoil than a lighter pistol.
However, not all things are equal. Polymer frames, while weighing less than steel or aluminum alloy frames, have a good bit of flex to them, which helps soak up some of the felt recoil as well.
To me, a Sig P226 all-stainless steel pistol is the softest-shooting .40 pistol out there, since it tips the scales at a hefty 42 ounces, unloaded.
An alloy framed Sig P226 and a Glock 22 have about the same felt recoil, even though the P226 weighs more by about 8 ounces, give or take. A Kahr T40 (all stainless) has a bit less felt recoil than either.
Of course, you can also get a Glock 22 C, which has the porting on the slide and barrel, and that feels softer than any of the above (except for the all stainless Sig P226).