I have an Ensoniq patch bay I used to use in my studio that is a MIDI eight in/out. Hadn't used it in a while, and I forget the actual model name/number (no longer made of course). Any of the inputs can be sent to any of the outputs, so this could be the "MIDI box" your friend used to route 5 inputs to one output as you describe. You can also Google for MIDI merge boxes.