My 240 had the same symptoms a few weeks ago. It did not like going under 1/2 tank of juice, spluttered, stopped. Stated immediately with the pump screaming, but only went for another few hundred meters. Lucky I was about 1k from the servo and it ran ok on a full tank. The problem was the perished rubber hose in the tank letting air to be sucked in under half a tank of juice. Had the same problem in another 240 years ago.
The pissy bit of hose is not petrol proof and will degrade over time.
If the hose hasn't given up you are lucky it has not happened. So when you are happily motoring and everything seems all well, think of the little bit of hose could be beginning to look
like this. Happy motoring.