TL;DR
Inserters should have a "lazy mode" that makes them not pick up things they don't have room for, and not drop things on the ground, to prevent "inserter jam"What ?
Inserters are very powerful, with many behaviors and uses. They can pick things up off the ground and out of inventories, as well as put things on the ground and in inventories. Depending on what they're facing towards, inserters' behavior changes a lot. If they're facing the ground or a belt, they'll pick up basically anything that's behind them, and try to place it in front of them. If they're facing an "untyped" inventory with empty slots, they'll do the same thing. However, if the inventory they're facing is "typed" (like an assembler) or is already full of items, they'll refuse to pick up a new item until they know what they need, and that they have room for it. This works totally fine as long as their target doesn't move, and is why inserters facing assemblers never jam.Basically, as long as the inserter has a target that can only fit some items, it will only pick up items that fit. If they have a target that can take anything (belt or ground), then they'll pick up anything. As an example consider when you are loading items into a vehicle. As long as the vehicle is parked, the inserter will only pick up what will fit. However, as soon as the vehicle moves, the inserter's target is suddenly the ground, so it will pick up anything again. Some of your items will end up on the ground, and worse, the stack in the inserter's hand may not actually fit when the vehicle parks again, causing it to jam. This is why trying to load multiple types of items into a train or car with a single inserter is so hard.
So what I propose is that inserters have a checkbox in their UI that switches them into "lazy mode" (or "conservative mode" or "non-greedy mode"). An inserter with this enabled will function normally when facing an inventory, but when facing the ground, will refuse to function. Basically, an inserter in this mode will only pick up what it has room for (like normal), AND checks that it has a non-ground target. If the target is a belt, then the inserter will grab any item behind it, but only if the belt isn't full. (More on belts below.) I think in this mode, the inserter should also limit it's stack size to what will fit. (So even if the inserter could normally pick up 3, it will only pick up 2 if that's all the room there is. I'm not actually sure if this happens in all cases right now.)