Ok so let me think this through out loud here: Y'all are saying that since the fuel shutoff solenoid was verified to retain voltage (test light on) during a shut down, that this cannot be the problem. But what else can kill a diesel engine? Its not just fuel flow through the solenoid - you need fuel to actually be injected into the cylinder, at the right crank angle timing, every other revolution. I presume on a small diesel engine like these yanmars, the timing is handled within the injection pump, and the injector for each cylinder simply opens when it is blasted with enough pressure from the pump, right?
How does the injection pump know the right timing to send fuel to each cylinder - is there an electronic crank position sensor? These can sometimes fail when they get too hot. If there is, and the part is cheap, try replacing. Because if the injection pump doesnt know when to deliver fuel to each cylinder... it wont. Even if the shutoff solenoid stays on, you know? If the pump timing is purely mechanical... disregard this notion.
You could also add a cheap, clear fuel filter housing up right in front of the injection pump. Watch this when your engine stalls - is it still full, or does it empty out? This would help verify where int he system the fuel has stopped flowing.
While it has nothing to do with it, my gas JD GT275 also does this. Shuts down when it gets too hot, and loses spark. Have to give it 15 mins to cool down and not try to mow much more. I replaced the ignition coil twice, then put it back to the original coil, and now it's better? very confusing.