Avengers 4: 9 Things We KNOW Will Happen
8. The Second Half Of Dr. Strange’s Plan
Whatever form this takes, we at least know one member of the Avengers has the endgame mapped out.
Stephen Strange says as much in the back third of Infinity War - right around the time everyone else is fading away into nothingness.
The assumption is that when Strange looked into the future and scanned "14,000,605" different futures, the genocidal wiping of the cosmos was the "only way" the Avengers eventually win. Said "win" will be Avengers 4 (at least you have to imagine it will be), and presumably this is why Strange doesn't tell Stark what needs to be done - because the key to victory is letting a VERY specific series of events play out.
For wider context, Dr. Strange's powers have gotten so insanely out of control in the comics. We saw him shapeshifting entire planets and realities in the latest Secret Wars, but whether that means he still has some agency as a dust pile post-Infinity War... we'll have to wait and see.
Regardless, everything after he hands over the Time Stone was planned/forethought, no matter how insane it looked (and felt).