Have a comparator coming out of each hopper and then a repeater in front of that. You then need a wire leading into the opposite hopper that the comparator is receiving power from. this will lock the hopper but then it'll just be turning on and off once it's done. you need to have another wire leading into the opposite comparator. this will lock the opposite hopper until all the items are gone and then the other hopper will go until empty.
Load the hopper with 63 of each of the first 5 items and load the second one with 63 of the last 4 plus a tool of any kind then have a comparator test for full hoppers. the items go in the bottom two hoppers. of course you will have to empty the hopper of the single items when done to reset it.