The only US submarine of note at the Midway battle was the Nautilus, regardless of Admiral Nagumo's fears. Plus, American torpedoes were pieces of crap the first two years of the war. They seldom hit anything, and many sub patrols came back to base having the same performance that the pre-1020 bomber/attack/torpedo planes had on Japanese ships that day, which is to say hapless, worthless, and dealing no damage whatever. American expertise in carrier battle tactics were not in the same league as the Imperial Navy's co-ordinated assaults.
Additionally, Japanese battle doctrine was weighted strongly to offense, not defense, which worked with great success pre-Coral Sea, but ultimately doomed them.
They also lost a carrier at Coral Sea that should have been part of the MI attack, in addition to the carrier forces sent to attack the Aleutian Islands which was a silly game for a silly reward. These two albatrosses were foisted on Yamamoto as conditions for approving the MI attack, but he made little objection. Rather than concentrate massed forces, which Japanese military doctrine dictated, this "shotgun" approach diluted the Main Force was another massive mistake.
This never would have happened. Had Midway been lost, Japan could never have invaded and occupied Hawaii. They did not have the transport ability to keep such a captured garrison supplied, especially having to bring the supplies from half a world away in a submarine infested ocean.
Additionally, the most powerful nation on the planet with unmatched productive capacity would never negotiate with a smaller country which had launched a sneak attack such as Pearl Harbor.
Even if we'd lost all three carriers at Midway we would have equaled the Japanese in late 43 and surpassed them in 44. This does not count the escort carriers.
And consider we began to slow carrier production in 45 as we knew we were going to win the war.
In fairness to Japan, I don't know about that.
If you're going to take your enemy's fortified island, you're also going to have to take on his naval assets protecting said island. How else could you achieve your invasion goal? Ignore his counter-attacks sinking your transports?