I don't have a citation handy but I know eating fermented foods and increased fiber have both been linked to increased gut bacteria diversity. Thus seems in line with what the GP poster found for practical advice.
Its all about PREbiotics which are the food source for probiotics or your gut bacteria. Which encompasses some fiber and also sort of is its own thing. Long chain inulin and resistant starch are both some good ones