We came very close to losing that battle which would have added at least two years to the war in the Pacific
Because one of the cruiser floatplanes couldn't take off, there was a gap in the dawn search pattern - exactly where the US carriers were.
Yamamoto elected to let the seaplane be repaired.
If he had decided to fill the gap by detaching one of the strike force bombers, the US carriers would have been detected in time to cancel the strike against Midway, rearm the first wave with SAP bombs and torpedoes, and send them (with his best pilots)against the carriers. Leaving the second wave Zeros on his carriers ready to defend against any counterattack.
Some of the bravest people in America fought that battle. I think of the men of Torpedo 8 who lost all but one of their people
There is a fabulous book by Jonathan Parshall and Anthony Tully called "Shattered Sword: The Untold Story of the Battle of Midway". It is the battle shown entirely from the Japanese side and deals with everything from tactics to training to ship design to damage control and dozens of other factors as well. Read that and it's clear that the U.S. victory was not miraculous but the result of better ships, better leadership, and a bit of luck thrown into the mix.