I just had a similar problem present itself. Eventually I found the relay between the In
Gear Start Preventer and the starter had gone bad. The In
Gear Start Preventer is the microswitch on the throttle that prevents the engine from starting when the throttle is in gear (there is probably a better name for it).
In hindsight, what I wish I had done for diagnostics:
Get into a situation where you think the engine will not start (I think this means go sailing for a bit in your case). Use the glow plugs to warm up the
diesel. Leave the key in the ON position (so the
fuel pumps are on). Now go jump the solenoid/starter. You do this by taking a wire (or screwdriver) and connect the lead on the solenoid where the ignition switch comes in and connect it to the lead that connects to the starter.
What we are doing is checking the battery, battery connections, and starter. If the engine starts, we know these things all
work. If these things all
work, it means the problem is the solenoid, the wiring up to the ignition switch, or the ignition switch itself.
Let's pretend the engine starts by jumping the solenoid to the starter. Now work your way backwards towards the ignition. If there is a relay between the solenoid and the ignition switch, test that that is still functional. Also test that you are getting proper voltage to the input of the solenoid when the ignition is in the start position. If all this checks out, go up the loom towards the engine console.
Check if there is a relay between the In Gear Start Protection switch and the solenoid. Check the microswitch on the In Gear Start Protection.
If you get all the way here, I think the only thing left is the ignition switch.
Now, of course, intermittent start issues are always a bugger to debug.
Good luck and let me know if there's a step that doesn't make sense.