I have an idea for making you get less stuff that you have 999 of.
If you take the loot table for something which could be 50% pipe and 50% cog then divide the chances by how many of each item you have, then subtract the total chance for an item from 100% and then distribute that among all the options; for example, iv you have a loot table of 50% chance for a cog and 50% chance for a pipe and have 100 pipes and 0 cogs then divide them by the respective number(unless it's 0) and you would get 50% chance for a cog and .5% chance for a pipe, then subtract 50.5% from 100% and get 49.5% and distribute that among the options and end up with 74.75% chance for a cog and a 25.25% chance for a pipe.
This would work well since it scales and you still would have a 100% chance for an item. This would need refining, but I feel like it would make a lot of players have an easier time getting items.