A dog’s tongue is not cleaner than a person’s, and judging by the things they lick, it may not be as clean.
Dogs, like people, harbor various kinds of germs in their mouths, and dogs tongues have no special antiseptic properties.
Different species of animals do have different levels of resistance to the many different microorganisms. Some disease germs are highly specific, like hog cholera, while others, like rabies, can infect virtually any warm-blooded animal.
As for mud, a little dirt suspended in water would not in itself be harmful.
Dogs lick mud off themselves all the time, just as children eat mud and dirt all the time without harm.
Any danger would come from some other ingredient, like microorganisms or toxic materials.