I had the fortune (misfortune?) of working as an engineer for a large oil company in their pipeline department for a while when I was younger. The company pipelined gasoline into various markets either directly from a refinery or sometimes from a barge terminal or port. The place where a pipeline ended was called a truck terminal.
At these terminals would be a few gigantic above ground tanks (like 100,000-250,000 bbls) of gasoline, a big ethanol tank, a ‘rack’ (used to fill the tanker trucks), pipes, pumps, and a few smaller tanks of various chemicals, dyes, other additives.
There would typically on be one truck terminal in a geographical region, I was never aware of any competing pipelines coming into that region, and that terminal supplied fuel to all the gas stations in that area. I suppose it’s possible there could have been some independent gas stations on the fringes that trucked it in from somewhere else, but they would have been the exception.
There was typically a set of smaller tanks of chemicals close to the rack where the trucks were loaded. The trucker would pull to the rack (and there would be three or four lanes at the rack) and there was a computer where they would enter their order. Then a computer/PLC would activate various valves and pumps depending on which product was entered on the order. The additives, ethanol, and dye were all added to the fuel while the truck was being filled.
So for example, if a Shell truck was being filled next to a Chevron truck, they would both be getting their gasoline from the same giant tank (all refined by a third oil company), but they’re each getting their own ‘special’ blend of additives. Some of the additive tanks did have branded logos on them… Shell had their own, Chevron had their own, Marathon had their own, etc. But the the ethanol and gasoline all came from the same source. I couldn’t begin to tell you the difference between those additives, or whether they made any real difference to the consumer.
I do remember sometimes smaller no name trucks (I think they were called “jobbers”) and they often did not get any additives (or very few).
I can also say that the quality of underground storage at individual gas stations varied widely. Some older stations had leaky steel tanks. Some stations had issues with water intrusion into their gas. Some stations had accidentally contaminated their tanks at various points in time. Who knows what the history of a particular gas station’s tanks has been? You just have to take your chances unless you have some specific knowledge.
I would think there is minimal difference in ‘name-brand’ gas and other gas… Its probably the same gas, with slightly different additives. The only thing I ever avoid is buying gas while the tanker truck is actively filling the tanks at the station (I have no idea if this a valid concern, but it makes sense to me).
ETA - I should clarify, there were separate giant tanks for the various octanes of gasoline. The octane was determined at the refinery. and delivered back to back by the same pipeline, and directed to specific tanks at the truck terminal by a valve manifold.