The immune systems does nothing by accident. The immune system is always trying to keep the microbiome in balance and the microbiome helps the immune system as well.
There is no winning, only balance.
Idk if there's evidence of it but I know many people claim they developed celiac disease after a course of black label antibiotics