Literally, the phrase means that someone will have stepped in a pile of excrement.
In a country where a significant portion of people have driven by a farm (in a car), visited a farm, worked on a farm, or lived on a farm (small or large), the phrase evokes the feeling of disgust and dismay for everyone involved. First, the person who has stepped in the excrement has the visceral reaction to the accident of smooshing their foot down into the pile, leaving a clear mark of the sole of their shoe in the now-flattened pile. Second, everyone who comes into contact with the person (before they can change clothing and bathe) will be confronted with the aggressive, lingering smell of the mistake.
People who have strictly lived in cities may also have specific sense memory of this situation since cities use horses on roads for parades (on occasion) and horse-drawn carriages. Horses will defecate on the roads in these processes. Certainly, most native speakers are familiar with the phrase "horseshit", a particular brand of "shit" (which is a crass but generally acceptable euphemism for excrement, especially in the moment of accidentally stepping in it). The wheels of the aforementioned carriages may also go through such piles on accident.
However, the phrase in this particular evocation of that sense memory is awkward in my opinion. A possible explanation for this is that certain words on television in the United States of America are prohibited (at certain specified times; see the Federal Communications Commission's statement here: Obscene, Indecent and Profane Broadcasts) and carry with them a fine to the broadcaster. If less of them are prohibited now, that does not mean that they were not prohibited historically. Furthermore, this is how someone might talk to a child. The idea may be that saying "shit" around a child may encourage that child to begin using it frequently (since it is likely to get a reaction from people hearing it out of the mouth of a child).
The phrase "doo-doo" is also a replacement for "shit". To a native speaker, replacements such as this for obscene words and phrases ("swear words", "curse words", "cussing", etc.) may sound awkward. The level of awkwardness may be in the range of "at least a little ridiculous" to "absolutely ridiculous". There are some examples of this phenomenon here: Cursing Without Cursing. The part at the end of that video makes a callback to the somewhat nonsensical reason for why this even exists in the first place, but, since these are movie clips, they're fictional (and may be meant to parody the situation the language finds itself in).