Difference between USB ports in terms of IRQ and conflicts with the serial port

I have a Rockpi4 running Ubuntu 18. A Python script acquires images and audio from a USB camera and a USB microphone and receive/transmits information with an external controller through the serial port (ttyS4). I noticed that when the sensors are connected to the 3.0 ports, sometimes the script crashes. According to dmesg, the ttyS4 uses interrupt mode and according to vmstat the sensors activity causes a very high number of IRQ. As far as concerning the camera, this does not happen if I use the 2.0 port. What is the reason behind this difference? Is there a way to prevent/monitor conflicts between the serial communication and the USB sensors?

Can you provide more details of the issue, such as the kernel log, device node and the essential part of the scripts?