Your point about the loss of experienced aviators is an often overlooked point. In the subsequent carrier engagements in both the Battle of the Eastern Solomons and The Battle of the Santa Cruz Islands, the degradation in both the tenacious persistence and technical bombing ability (accuracy) of the Japanese attackers (when compared to Midway and before) was evident to the Americans being attacked. The Americans being attacked could see the difference.
Also often overlooked are the flaws in fundamental damage control design of the IJN vessels, the substandard training and implementation of damage control on those vessels, and the inability of Japanese shipyards to turn around repairs on damaged vessels.
A great book (Though hard to find) is “Shattered Sword” which discusses at length the poor Japanese approach to damage control design, training and implementation.
There is no doubt that the Japanese sailors had plenty of guts and determination when attempting to counter battle damage and fires, but the horrible design of damage control systems in terms of communication and firefighting aboard IJN ships worked against them. One well placed bomb could take out half the firefighting capability on a Japanese fleet carrier! (which as I recall, happened to at least one of the IJN carriers (Akagi?) at Midway...)
The design of the ships also impeded the ability of damage control teams to move about the ships. One of the carriers was designed with main passageways that were only four feet from deck to overhead, so that people laden with equipment had to crouch the entire way. I just cannot imagine that.
We were lucky at the Battle of Midway. But we had to be, we had a lot of things stacked against us. Even WITH some knowledge of IJN movements, that alone wouldn’t have been enough.
So absolutely, we were lucky. We made the most of our luck.
But that luck was the residue of good planning and tactics and, yes, heroism.
You are correct, “Shattered Sword” is a very good addition to the other literature on the battle of Midway.
One of the authors gave a 50 minute presentation which is well worth the watch as he raises some very interesting and contrary opinions on how it all played out.
Go here and enjoy: https://youtu.be/Y9rkKtK1b44
A great book (Though hard to find) is Shattered Sword