Can you wrap some plastic tightly around the cables where they pass through the hole, spray with water and then inject the foam around them? Something like pallet wrap would let you get a tight fit to the cables, but you'd need to test if it was a barrier to the chemicals in the PU foam.