According to WebMD (https://www.webmd.com/skin-problems-and-treatments/news/20060929/foot-fungus-spreads-among-families#1), studies confirm that toenail fungus does spread among families.
By using molecular biology techniques, researchers in one of the studies observed the expansion of the microorganisms called dermatophytes, which commonly cause toenail fungus, among families.
Also, another study found that among 57 families in which at least one person had toe/foot infection, 19 families had more than two people whose toe/foot are infected within the same family.
Those researchers even confirmed the same DNA type in the dermatophytes among 42% of the infected families. It could mean there is a high chance of fungal foot/toe infection spreading within families.
This evidence provided by these studies tell us the importance of treating fungal infections on your toe and foot.