Horse poop is generally harmless. A bit gross perhaps, but it's not toxic - it's mostly water and undigested plant matter.
That aside, I agree, poop and fumes are both negative externalities and we should address them properly (regulation/taxation/whatever).
I think you underestimate how bad cities were at the end of the 19th century with regards to horse poop. Streets filled with horse poop absolutely could and did cause serious public health problems.