i dont know if it is possible to code something like this, but its something i would really admire.
right now its annoying when you have to watch your recyclers because you dont have a full 64-stack of stone/dirt/whatever to recycle but lots of different stuff.