The Hadith of the Fly is a notorious Hadith, both for the fact that what it teaches is, scientifically speaking, extremely dangerous, and also for the Muslim attempts to justify it scientifically, or otherwise nullify what it says:
Sahih al-Bukhari 3320
Narrated Abu Huraira:
The Prophet (ﷺ) said "If a house fly falls in the drink of anyone of you, he should dip it (in the drink) and take it out, for one of its wings has a disease and the other has the cure for the disease."
This is also narrated in Sahih al-Bukhari 5782, Sunan Ibn Majah 3505, and Sunan Abi Dawud 3844.
Firstly, there are studies from Muslim nations which attempt to vindicate this Hadith scientifically. However, the studies are not peer-reviewed by qualified non-Muslims, and without exception, do not test the claim of Muhammad in the narration. The claim is not "insect wings have anti-microbial properties". The claim is that one wing of a fly has a disease, and the other has the corresponding cure for that disease, which will eliminate the disease if mixed in a solution of water. That claim is never tested, because it is obviously not true.
Further, by submerging the entire body of a fly in a drink, as Muhammad mandates in the narration, one has just added millions of additional bacteria to the drink which would not be added if the fly was removed after only being partially submerged, as most bacteria live on a fly's legs and torso, not on a single one of its wings.
Lastly, some Muslims, who can rightly see that this teaching, in context, is harmful, will assert that Muhammad could err in non-theological matters, such as this. However, Muhammad actually said that one must obey him as if he were God (Surah 4:80, Sahih al-Bukhari 2956, 2957), and never dispute with any of his judgments (Surah 4:65, 33:36, 49:1). Therefore, it is an abandonment of orthodox Islam to say that Muhammad could teach something so clearly false to Muslims, as he did in this narration, which Muslims are free to disobey - not submerging flies that fall into their drinks, in spite of what Muhammad taught. This is why most Muslims do not hold this view, favoring the aforementioned attempts at rationalizing the passage instead.
In some narrations, Muhammad made statements to the effect of "water is not defiled by anything", despite having refuse and animal carcasses floating in it:
Sunan Abi Dawud 67
Narrated AbuSa'id al-Khudri:
I heard that the people asked the Prophet of Allah (peace be upon him): Water is brought for you from the well of Buda'ah. It is a well in which dead dogs, menstrual cloths and excrement of people are thrown. The Messenger of Allah (peace be upon him) replied: Verily water is pure and is not defiled by anything.
Sunan Ibn Majah 520
It was narrated that Jabir bin Abdullah said:
"We came to a pond in which there was the carcass of a donkey, so we refrained from using the water until the Messenger of Allah came to us and said: 'Water is not made impure by anything.' Then we drank from it and gave it to our animals to drink, and we carried some with us."
Sunan Ibn Majah 521
It was narrated that Abu Umamah Al-Bahili said:
"The Messenger of Allah said: 'Water is not made impure by anything except that which changes its smell, taste and color.'"
Notice that the last narration above qualifies this dangerous teaching with, "Water is not made impure by anything except that which changes its smell, taste and color". Even with this qualification, the claim is still false, and dangerous.
Waterborne diseases are all microscopic. A person can drink crystal-clear water that has Cholera, E. Coli, or some other dysentery-causing microbe, which can kill them. Other waterborne diseases such as Hepatitis A, Salmonella, Typhoid fever, Giardia, and Cryptosporidium are all microscopic.
Although the above narration in Sunan Ibn Majah 520 explicitly mentions drinking the water, merely using contaminated water for washing is also dangerous. The diseases and bacteria can get into cuts in the skin, or through a person's eyes, nose, ears, or mouth when they wash their face. Therefore, Muhammad's advice here is dangerous, and scientifically speaking, completely wrong.
What Muhammad taught about water safety and disease was dangerously erroneous, especially in a time in which people could not consult the scientific community for guidance, and had no knowledge of germ theory.