The medication depends on the cause,
SMZ TMP will treat giardia, coccidia, ecoli, among other things.
Metronidazole will treat giardia, clostridium, among others.
Amoxicillin will treat clostridium, e.coli, strep, among others
Baytril will treat a number of things including mycoplasma, e.coli, and clostridium
Tylosin will treat clostridium, mycoplasma, among others.
Certain antibiotics have a stronger effect on certain bacteria.
Any antibiotic will kill the natural good bacteria in the gut along with the bad which increases the odds of getting a Candida infection “sour crop” or an opportunistic clostridium infection. Every antibiotic is just as likely to do this as baytril, baytril is often prescribed when the vet isn’t sure what is the cause of a bacterial issue or if there’s multiple issues which is common, for example clostridium and e.coli are also common secondary infections to things like coccidia, parasites, and mycoplasma.
So being honest giving any antibiotics comes with the risk that they could get Candida or clostridium which can both cause excessive gas and an impaction.
But what you can do is to give a good probiotic simultaneously and after the antibiotics are finished, you can also get nystatin if they do end up with Candida, you can get nystatin from a vet or order it online
https://birdpalproducts.com/products/fungistat-powder?_pos=2&_sid=a0a208970&_ss=r