Compare that against the alternative - horses. Horses were a huge sanitary problem - manure and dead horses. Horses also simply killed a lot of people, as they are big and strong and not always controllable.
Apparently some places, like England and New York City, kept very good records on horse and other traffic accidents. Here's a paper that purports to show that horses were dangerous and even more dangerous than cars: The Dangers of Automobile Travel: A Reconsideration, https://www.jstor.org/stable/27739679
But I quickly read through the entire thing (JSTOR still has free access: cool!) and AFAICT automobiles were far more dangerous than horses, both in absolute fatalities and presumably even more so adjusting for the number of horses and cars per capita. Toward the end the author tacks on train and streetcar deaths just to make automobile deaths look better. Indeed, it's not until the very end where the author isn't constantly drawing conclusions and providing anecdotes that seemingly contradict his own hard data. Only on a per mile basis, and then only a few decades into the age of the automobile (i.e. after traffic controls become common and pedestrians become persona non grata on the street), are automobiles indisputably safer.
Considering the utter lack of almost all traffic controls prior to the automobile and the way that pedestrians intermixed with horses, the figures are actually astonishing. More astonishing when you look at train and streetcar deaths, which were apparently incredibly lethal. I'm glad I found that paper because almost all other sources I found--which completely lacked any hard evidence--claimed horses were far more dangerous. (So does this one, though the data suggests otherwise.)
I talked to a 60 year old cowboy about the dangers of horses and asked him how many times he was stepped on.
Twice. From 7yo to his early sixties. Given that horses are active participants in traffic and they will go out of their way to not step on you, they would seem to be orders of magnitude safer compared to cars.
I've been stepped on by a horse and my total time dealing with horses is probably less than an hour.
Besides, I'd expect a professional cowboy to know how to protect himself from horses, just like a professional driver is going to have fewer car accidents.
We're all "professional pedestrians" too (on some countries at least even trained as such from early age). You probably weren't prepared appropriately for your encounter with horses.