Been there Done that
I have had to come in on Sail twice, once in a dinghy with a very old Johnson 2hp Sea Horse and once on my 30.
In both cases the reason was the same engine failure. In the case of the dinghy I was just learning to sail (about 4 years ago), was out by myself turned for home, when the wind went down to nil, I went to start the motor, gave the rope a tug and when it split I nearly fell out. As the sails were still up I waited till a the wind came up and sailed as close as I dared and rowed in the rest of the way.
The next time I was bringing the Hunter home, from the PO's marina about two days out from home and was also taking her to the Good Old Boat Race as the mid point of the trip. I had been sailing for about three years at that point. My friend John who had gotten me into sailing was aboard as was Jackie his significant other. He is a skilled sailor and regular racer. It was a good thing he was on board as it turned out. We left Solomons Island with a brisk wind but little chop and the boat handling well. As we left the river and got into the bay the full force of the wind hit, it was blowing 30 mph with gusts near 50 and the waves to match. The main had no reef points and by chance we had pulled out the storm jib, so off we went. The boat handled well in large part due to his seamanship, in part because it is a great handling boat. If it had been just me the boat would have stayed in the river till the wind came down to a more livable number, but as we had to vacate the slip and needed to get to Annapolis for the race and would not have been able to get there for the skippers meeting if we had to give up a day we went.
What happened the following morning was a direct result of the chop. Coming into Oxford we had put on the engine at the rivers mouth about 3 miles out. The waves continued for about 2 miles of it. We got into harbor and dropped anchor. The following morning we motored back out of the anchorage toward the bay. About a mile up we found the chop from the day before even though the wind was now down. We bounced along under power as we got ready to hoist sail. With the main up and the jib about to be the engine sputtered and died. Cranked it a few times but wasn't starting, so we hoisted the jib and turned back to Oxford. I went below to look at the engine everything looked like it should. Back on deck crank it again sputters and runs about 3 seconds and dies. Having only just bought the boat 2 weeks earlier wasn't making me a happy owner. We called the marina told them we were coming in under sail and they cleared a space for us. It went beautifully.
We dropped the main about 100 feet off and coasted in coming to a stop within inches of our target.
Problem, remember the chop it had stirred up the fuel tank and the water separator had filled up sending water to the injector. Lucklily no real damage and learned how to bleed the system that evening.
Since then we have done approaches like that one once in a while as practice, in a 34 year old boat with its original power plant you have to assume once and a while you are going to have to get back without power. Mind you I'd still just as soon have a more experienced skipper calling the shots if it were the real thing again.