I had an issue on a
M7040. I spend days and even tried a new fuel pump after draining the fuel, replacing filter, taking of the fuel and checking for vaccuum, etc. Tractor would run fine for a while then after being under load would start to sputter then die. Let it sit a while and it would crank and run for a while then eventually die. Check the 90deg fitting and shutoff valve on the fuel water separator. Take the separator off and take the shutoff valve apart. There is plastic cylinder that is the internal part of the valve. This was packed with trash and eventually starved the engine of fuel when under load. At idle it would run for a while, but high fuel demand for several minutes and it would start to starve.
I had heard of this issue but bc the tractor would run fine for a little while, I thought it couldn't be a blocked line. I went as far as talking a 5 gallon can an stapling to the hood and feeding the injector pump directly to rule out an injector pump issue. I kept working my way back in the system adding components until the separator was identified. Wish I would have just checked this first.