Where the number of inserters matched, for example two inserters and one, two, or four inputs, everything was fine. Factories that had three inputs got stuck. It seems that with two inserters unloading three inputs, the inputs came in unbalanced, and stayed unbalanced, until the supply train got stuck holding inputs that were not needed yet, and the factory blocked waiting for an input that had been exhausted.
My first attempt to fix this was to change the exit criteria from a simple train empty, to checking if any of the inputs were gone. That resulted in the train taking off when the factories would have been happy to remove the remaining items, so I changed it to check any inputs were zero AND the train was inactive. That made things a little better, but ended up just pushing the problem further down the supply chain, until for example a train delivering iron plates was sitting in the station with 8 plates in one cargo wagon, the other three were empty, and the train to be loaded didn't need any more iron in the matching wagon to be loaded.
I started going down the rabbit hole trying to identify when one but not all of the cargo wagons were empty, but I realized that was going to fix a symptom, not the cause. (And I haven't got a solution for that one either
![Wink ;)](./images/smilies/icon_e_wink.gif)
What I have done is to change the factories with three inputs to have three inserters unloading the supply train. Hopefully this will keep the load balanced, so I can go back to a simple check for an empty train. Of course putting three inserters on the input side means removing and replacing the factories one space over, and limiting the output side to two long-handled inserters instead of three. I don't think this will be an issue as the products that are produced fast enough to keep all three long-handled inserters busy (gears, cables, and green circuits) only have one or two inputs so they work fine with two loading inserters.