Besides an opto-isolator, all the USB cables will benefit from having snap-on ferrite clamps placed both ends, approx 1” (2.5cm) from the plugs, to help suppress transient interference.
And I learned the same thing relating to Ethernet cables this morning as well, while talking with Eric Dose. Ferrites to suppress the common mode spikes which most often come from nearby lightning hits.