TL;DR
If an inserter ends up holding something that can't be put in the destination have a bot pick it up.What?
There have been various discussions as to what to do when an inserter can't do it's job. Putting it back has been rejected because sometimes it can't. And we have the related problem of items spoiling while being inserted. Most things you would be inserting a spoilable can accept spoilage, but not all.Instead of the various attempts to come up with solutions for the problem avoid the whole thing. Inserter is holding something that doesn't belong where it's trying to put it, treat it as an item on the ground selected for deconstruction. Works in every case, no weird behavior.
viewtopic.php?t=121072
and I feel like there was more discussion but I'm not coming up with it right now.