How do you efficiently automate multi-train systems so that you don't wind up with product stuck in train cars?

It's effectively impossible in Vanilla, for two reasons:

  1. There's no infinite storage anywhere
  2. The game is not designed around perfect ratios or timing

In the best, most perfectly precise scenario, you can supply a resource at the exact rate it's going to be consumed, or you can do essentially the same with a small buffer. But the way this game is set up, any manageable buffer you can build will fill in a fairly shot order if supply is even slightly more than demand.

Given that demand is not fixed for almost most resources, since things like military spending will fluctuate, and given that storages will always fill up within a few train cycles if you over-produce, and given that under-production hurts efficiency of the entire factory....

You are intended to over-produce and simply halt production when you exceed your needs. This is exactly what happens in game when any resources are produced but have nowhere to go: Miners, Furnaces, Assemblers, everything will simply halt once there's no valid destination.

That's the game's core philosophy. What you are trying to do goes directly against it, which is why it's effectively impossible.

/r/factorio Thread Parent