The actual plan made very little sense because different elements of the IJN command had different priorities. Some of them, and all of the army, thought the actual Island of Midway and then Hawaii were the targets and thought the CVs didnt matter. It never occurred to them that even if they were able to invade, which is doubtful, they had no way of supplying either. It was to far away and they had neither the transports or the ability to protect the transports.
OK so say they were all on board with Yamamato. The plan was still overly complicated, assumed way to much, and the command/control between their units sucked. They sent the old "S" boats as pickets and they were so slow they got on station a day late because they were such easy pickings for aircraft they were ordered to stay submerged during the day whenever they were within 500 miles of an enemy. So the entire USN CV group slipped right on by before the submarines made it to their stations.
Then they had so few Recce airframes they weren't able to search to the north of Midway very well, they had no radar and with the cloud cover they didnt know the USN dive bombers were there until just about when they dived.
But from A, and then to Z, the entire plan was unsound and poorly prepared for. Even their practice drills for the attack were a joke compared to the ones for PH which were fantastic. I was aware of some of this but I was not aware of what a total cluster the Midway plan was on the IJN side. And at the heart of it was this silly Japanese belief, which Yamamato bought into 100%, and that they bought into ever since a storm wrecked the invasion force of Kublai Khan, that one great battle will set up an end to the war. The Battle of Tsushima against the Russians in 1904 only strengthened this belief and it never occurred to them the USN was not The Russian navy. BTW Yamamato was a junior officer at Tsushima and was wounded in battle there. No wonder the "One Great Battle" strategy never left him.
If I recall the deployment of the Japanese ships was botched, which did not help matters.
Also, I believe Yamamoto's intent was to catch the American fleet by surprise by drawing them into a diversion and them closing in for the kill. All of which would not happen due to the code being broken.