BMW 3-series mysteriously loses power on freeway

Your car has two fuel tanks. The fuel pump takes fuel from the one on the passenger side. There is a transfer pump that moves fuel from the driver side tank to the passenger side tank. The fuel guage averages the readings from the two tanks to tell you how much fuel you have.

If you run out of fuel with around 1/4 tank showing on the guage, it means that the passenger side tank is empty, and the driver side tank is less than half full; too low to gravity feed over to the passenger side tank. The transfer pump is not working.

I am not certain, but I think that the transfer pump in this car is a jet pump. That means that there are no moving parts. If it is not working, that either means that the fuel filter is nearly plugged and there is not enough fuel circulating to make the jet pump work, or rubber seal has failed in the jet pump so it is leaking too much to work.

If you have never replaced the fuel filter, you might be very lucky and find that a new fuel filter solves your problem. I would not bet on it, though.

The bad news is that the main fuel pump has run dry several times. That is really hard on it. It may last another 100k miles, but it probably won’t. If you want the car to be as reliable as possible, you probably want to replace that fuel pump when you fix the transfer pump. On-line price for a new main fuel pump is $150. Changing it is not difficult, but it is dangerous to open a gas tank if you don’t know all the safety precautions to take, so it is best to pay a professional to do it.

Speaking of professionals - it seems like you are taking your car to people who only know how to read computer codes. If there is no code stored, they are out of ideas. See if you can find a good, honest, German car specialist shop. Here in Sacramento we are very fortunate to have several excellent shops to choose from.