Using NCS 2.9.0, Zephyr 3.7.99 on a custom nrf5340 board, I want to have multiple functions enabled on the USB interface : zephyr supplied MassStorage (msc), virtual UART (CDC-ACM), and my own custom CCID class for smartcard access.
I have managed to navigate the endpoint address maze (hint : the zephyr usb stack ALWAYS fixes up the endpoint addresses to avoid conflict between classes as per https://docs.zephyrproject.org/3.7.0/connectivity/usb/device/usb_device.html#implementing-a-non-standard-usb-class), and avoided running out of endpoints by configuring num-in-endpoints/num-out-endpoints for the usbd device in the DTS (see below). And to get the usb_transfer() function not to run of 'slots' by setting CONFIG_USB_MAX_NUM_TRANSFERS=8 instead of 4 (would have been nice to put that info in the doc guys...)...
However, in the same device config I also set the USB speed to be 'high-speed':