i have been in such villages when i went to mali, senegal, cote d'ivoire as tourist.  they have small toilet sheds at the far end of the compounds. the streets in the villages are kept clean, nobody shits on the street.
Germany