The description of the engine shutting down in the original post sounds like fuel starvation is the cause.
If you have the same symptoms, my first action would be to ensure I have a clean fuel flow system from the tank to the injectors.
As
@Stu Jackson has posted, depending on the type of fuel filters you are using, there may be a check valve in the fuel filter intake. That valve caused problems for Stu. You can find the issue/solution described here on the SBO forum. Search for "Fuel Check Valve" and Stu's name in the member block.
Other than that sneaky issue, the rest is straightforward. Open and clean all hoses and connections. Install clean new filters. Treat your tank to a cleaning, polish your fuel, or try to treat the tank with additives that will kill any diesel bugs, then flush them through your filters and replace them.