Most issues with hooves and bacteria/fungi are with non-aerobic bacteria. So if you keep the hooves clean and open, the bacteria have a harder time taking hold.
A good trim discourages junk from building up in the hoof. With shoes, I hear people do use products to help keep muck out. For example I have heard people use spray-on Pam. Anything like this, apply only to the bottom of the hoof and try to avoid the frog.
I encourage daily picking and brushing out with soapy water (lysol or sunlight dishsoap depending...), then rinse. You can apply an antifugal cream, but if the pasture is very muddy, it may not stick around long enough to help.
Don't apply anything to the outside of the hoof wall.