So, the port of Espruino to the Nucleo F401RE doesn't need the USB functionality mainly because it has an equivallent USB connection through the ST-Link v2 integrated one. This makes it an mbed compatible board.
As a result, the USB port is under control of the ST-link and seen from Espruino's side as a serial port...
The various difficulties, mentionned above, are just about flashing Espruino on a Nucleo board. They do not impact the functionnalities under Espruino.
That said, it could be interesting to have the usb available on this board as it is OTG on the STM32F4.
I think getting USB to work would need to break apart the ST-link board thus freeing the serial port used, design some accessory board providing the correct STM32F4 pins as well as a steady 5V power supply and the proper USB connector. Just to add, some HSI or LSI are provided by the ST-link part to the Nucleo, this is to consider too, specially for USB.
On the Espruino interpreter side, you will have to reconfigure the serial link used with the ST-link part and let it behave as a USB port. The Pico is doing so but that's to be carefully studied as there is no bootloader in the Nucleo board port of Espruino.
Quite a lot of work actually, specially compared to the Pico beeing readily available.