I think there is even some evidence that cesarean births have higher risks of some infections because of not being exposed, I even recall that they did some things with babies being born with cesareans because of this.
But the feces is sterile. It's not even feces exactly, it's meconium and doesn't look like feces and doesn't smell at all (it's basically the remains of cells from the intestine and the amniotic fluid the baby swallows).