Other possibilites that I'm going to throw out since you seem open to it:
-John is there with Sherlock and Mary when the explosion occurs. He gets injured or partially trapped under rubble, so he can't assist physically, but can still guide Sherlock.
-Mary, as a nurse, walks Sherlock through the delivery instead of John.
-Sherlock goes into his mind palace and mind palace!John tells him what to do.
Re: Just Breathe
-John is there with Sherlock and Mary when the explosion occurs. He gets injured or partially trapped under rubble, so he can't assist physically, but can still guide Sherlock.
-Mary, as a nurse, walks Sherlock through the delivery instead of John.
-Sherlock goes into his mind palace and mind palace!John tells him what to do.