The premise is highly improbable, as after Pearl Harbor there was no possibility of Japan or the US even considering any peace agreement the other would accept.
Debatable point. Things would have to go radically wrong from the RTL (almost ASB) to actually make the opening premise, possible, but we will P.o.D that a bit and see if we can chase off the ASBs.
But... let's go with this:
Midway, by a series of near-miracles, ends with the complete destruction of not only the Striking Force (the carriers) but also the Main Body. There is nothing left to defend the Home Islands (and the Emperor!) from American carrier raids. The disaster is so bad that it cannot be concealed.
How do we do that with late 1930s US technology? I don't mean miracle weapons and improbables, I mean with Devastators, Dauntlesses, B-17s, PBYs, other American RTL airplanes present, the torpedoes in use, the gun platforms, the doctrines, etc?
It is barely possible, that the 300 planes of the Midway air garrison and aboard the three American carriers can sink the four Japanese aircraft carriers and possibly one of the two seaplane cruisers and one battleship of the screen/scout force that Nagumo took into battle and that the other battleship would succumb to the American submarine that attacked it. Barely possible. It is even conceivable Yorktown survives intact. I have wargamed this result once or twice.
But... the Hornet has to have a competent air staff and a different captain, Miles Browning's decision making and incompetence has to be utterly set aside, air recon from Midway has to ATL be more accurate, Stanhope Ring has to make it to the fight and USS Nautilus has to sacrifice herself to get either Soryu or Kongo. Take your pick of P.o.D.s. And US air casualties, RTL appalling at Midway would have to be even more so, maybe 2/3 loss of pilots and aircrew instead of the 35%.
Is that enough? The Turkey Shoot started the Japanese peace feelers. It was about as catastrophic navally, but not geographically. Maybe a battle of annihilation later in the Eastern Solomon Islands might be necessary. I am looking at that NOW.
============================================================
So... Japan decides to make peace immediately and save what they can. This is the offer:
All Japanese forces will be withdrawn to the territory of the Empire. That is, Japan will evacuate Burma, Thailand, Malaya, the Netherlands East Indies, North Borneo, Indochina, the Philippines, New Guinea, the Bismarck, Solomon, and Gilbert Islands, Wake, Guam, and China. (This includes Manchuria; however Japan plans to keep control through several thousand officers and NCOs "seconded" to the army of Manchukuo as its commanders.)
As a token of good faith, all artillery and military vehicles will be left behind. All Allied military and civilian prisoners in Japanese custody will be released immediately.
In addition, Japan agrees to dismantle all military and naval installations in the Trust Territory of the Pacific, and that the Marshall Islands shall be a US mandate and the Caroline Islands will be Australian.
As to war criminals: Japan states that the decision to go to war was imposed on the Emperor by irresponsible military and naval leaders. These men started the war, and having led Japan to defeat, have atoned appropriately for their failure, IYKWIMAITYD. A list of 50 names, or it may be 300, is attached.
This is not what the US wants (e.g. "the Japanese language will be spoken only in Hell"), but it is a huge win for the Allies, allowing them to concentrate on Europe. They can get more, but only at the cost of thousands of men KIA and billions of $, plus massive civilian suffering in Japanese-occupied territory.
Could the Allies possibly settle for it?
No. As long as the Japanese hold the Mariana Islands in any capacity, the war continues. No sane allied military commander or political leader can allow a Japanese presence in the Marianas Islands. The Japanese could establish an air bastion and a raiding base there. The US would have to insist these islands pass into US control.
It is a question of naval geography and air power. In fact I regard the evacuation of those islands by the United States (excepting Guam) as one the stupidest geo-political decisions the US government has ever made.