Based on the available evidence, the worst xanthan gum seems to be capable of (in adults) is causing some digestive distress in those who are susceptible by increasing stool bulk, water content, and sugar content. But as I just mentioned, those with severe allergies should also be careful.
I recommend that people with digestive problems generally avoid xanthan gum, not because there’s evidence that it could damage your gut, but because its structural properties make it likely to produce unpleasant gut symptoms. Unlike carrageenan, there’s no evidence that xanthan gum can cause serious harm (even in human studies using doses much higher than people would normally encounter), so if you are able to tolerate it, I see no compelling reason to strictly avoid it. I wouldn’t recommend consuming large amounts every day, because xanthan gum appears to have a high propensity for altering the gut microbiome, and it’s unclear whether that alteration could be problematic in the long run. But the small amounts that you would normally encounter in the context of a real-food diet shouldn’t present a problem.