There are widely known effects of growing up with a dog on immune system strength and proneness to allergies [0]. I have never seen these associated with gut fauna, but the implication is that some of the 'dog gross' gets onto you and trains your system.
[0] https://www.webmd.com/hypertension-high-blood-pressure/featu...