When most people say "dirt", they can't really be specific about what they mean. Sometimes they mean excrement and urine, but mostly the expression is used quite non-specifically.
In most "civilized" societies, encountering another humans excrement would be a rare event indeed. And it is here that the risk for infection from such as hookworm occurs. It is possible to get animal hookworm from animal excrement, but the larvae do not do well in the unfamiliar human host. The skin rash that can result is actually quite rare when you consider the number of dogs and cats in western societies.
As for urine ... well it's certainly to be avoided due to the "yuck" factor, but it's nothing to get alarmed about. Urine is sterile and harmless. We pulled the following quotes from the web:
" ... Well, urine is NOT a toxic waste product and this has been scientifically proven. 95% of urine is water, 2.5% consists of urea and the remaining 2.5% is a mixture of minerals, salt, hormones and enzymes.Toxic substances are being removed from the body through the liver and intestines, through the skin and through the outbreath. The main function of the kidneys is to keep the composition of the blood in optimal balance.When there is to much water, the kidneys will remove it. But that doesn't make water into a toxic waste product ..."
"You can find urea in many skin products as one of the main components. Furthermore, urine is entirely sterile after secretion and has an antiseptic effect"
"Many medical researchers, unlike most of us, know that far from being a dirty body-waste, fresh, normal urine is actually sterile and is an extraordinary combination of some of the most vital and medically important substances known to man. Now this fact may be unknown to the vast majority of the public today, it is nothing new to modern medicine"
If anything, the urea is probably good for your skin.
These are everywhere, but are no particular cause for concern with regard to bare feet. Hands touching dirty doorhandles (then absentmindedly rubbing eyes or noses) pose a risk that is several orders of magnitude greater. Here is what a recent issue of Scientific American had to say:
.... One component of the solution is recognizing that bacteria are a natural, and needed, part of life. Bacteria, which are microscopic, single-cell entities, abound on inanimate surfaces and on parts of the body that make contact with the outer world, including the skin, the mucous membranes and the lining of the intestinal tract. Most live blamelessly. In fact, they often protect us from disease, because they compete with, and thus limit the proliferation of, pathogenic bacteria--the minority of species that can multiply aggressively (into the millions) and damage tissues or otherwise cause illness. The benign competitors can be important allies in the fight against antibiotic-resistant pathogens. ....
[ from The Challenge of Antibiotic Resistance in the March, 1998 issue of Scientific American ]
The world is full of compounds one could label as "dirt" and the human body is well equipped to deal with them (or we would all be dead). Unless you want to raise your children in sanitized, plastic bubbles, it would be a better idea to confine such worries to actual, describable risks rather than to anonymous ones from so-called "dirt".
But, What About ...