Oil loading is pretty simple, an assembler + one chest for empty barrels and one for full barrels, but then you run into the problem of the number of empty barrels the station need isn't a constant number. This lead me to create a oil loading station that grabs empty barrels based on how many filled ones it managed to create in the time between train visits. It grabs <number of filled>+10 each time the train visits.
It waits for a train to arrive at the station (using the rail signal change from green as detector) at that point it grabs the number of full barrels stored, tell the empty barrel inserter to fill the chest with that+10, when that is done it loads the full barrels on the train. I use a train with two wagons, one for full and one for empty barrels, so the system never request more than 400 barrels and my oil unloading station, make sure the train has 400 empty barrels, but as a fail safe, the train leaves the station based on inactivity.
Blueprint-String