I've only seen this once or twice in all my years in Germany....where someone in the office (during my Air Force years)....ran out of gas on the autobahn. It's an odd predicament to get into, and it's not like episodes of a similar nature in the US. So this is advice over a random act of stupidity....if you ever get into this episode.
When driving on the German autobahn....you are expected not to pull over unless your car breaks down, period.
If you have a broke gas gauge, and you merely track the tank values by guessing when to refill....and you run out of gas one day.....it's a thirty to seventy Euro fine, if the cops stop to ask questions.
Running out on a back road somewhere? Much better and less likely to be a fine. Generally, if the gauge is messed up.....figure somewhere over the next two or three months, you need to fix this solution in a permanent way. Guess the mileage and refill the tank every two hundred miles. But don't sit there and pretend it will go away.
So if you run out of gas on the autobahn? If you are confident that this is the problem....call your ADAC number ASAP. Hope like heck that they get there in an hour and will give you two or three liters to get you started to the gas station.
If the cops stop? Act dumb. Tell the same story....it just broke down....you know nothing else...and you called ADAC. Don't let the cop sit in your car or try to check things. This only gets to the step where the German cops will ask if you ran out of fuel.
By law, you violated a clear piece of German driving law. Paying a thirty Euro fine is stupid and simply not necessary.
Just two cents over a little episode that can get an American into trouble. And no, I've never ever....ran out of fuel in any car...ever. I've had brakes give completely, and that was thrilling enough for me.