OK, right up front. I am a power boater.
My fuel tank
has never collected sludge or water.
Why? The engines run a lot! Fresh fuel, Fresh filters, No problems!
I have even pulled a fitting out of the tank and siphoned fuel out from the bottom, clean!
A diesel needs to run, whether in a power boat
or a sail boat.
Back to the original question. The surest way is to replace everything but also the highest cost.
My choice would be to use a fuel polishing service
. Pull a couple of fittings out and use the return stream like a power washer to clean the tank. You can add something to improve the fuel's solvency like Pri-D or even some Biodiesel. A few gallons of fuel wouldn't hurt either.
The Racor does not need to be any finer than 30 micron. The secondary filter on the engine
should be finer- 10 micron.
The most important thing going forward, run the engine at least once a week at 80% output for a half hour or more. I see sailors running at idle to exersise the engine, this doesn't get the oil
up to temp.
some fuel is cheap
compared to a new tank and engine.
Burn as much fuel as you possibly can! Yes, I am laughing as I write this.