The optical isolation would help more if you got any high voltage/currents on the wires as it should protect your port and pc from damage, then again PCs are probably that cheap now that its maybe not a huge concern.
Ok the 5v side of things would just work like any other input you have on your BOB, for example how are your limits wired, do they just come from the input, through the switch to the bobs gnd?
Hood