Ingredients and entities (buildings) differ between mods, unfortunately. I only started playing your mod in .17, but there was a mod I was playing in .16 that could've had the same issue. Basically if a building has "repair" abilities, I've seen it implemented that the building is either requesting specific items (via a robotport requester-chest type interface) and consumes them as they come in, or it has an inventory and once the required ingredients are present, eats them, leaving any extras behind. Warptorio2 expansion uses 'broken' and 'wreck' in the names, but I don't think you can do a regex for those.
It was only a small issue, since I knew what was causing it and thought of a workaround. Maybe if an entity is a non-base entity you can ignore changing the inventory, or double it first because obviously stack sizes can get screwy (so it varies but like, from 150-250%, to accommodate when some stacks are crappy)
P.s. thank you for the mod, it does make things more interesting.