Try using mpremote for installation. You can install it via pip. The command to install hid using it is:mpremote connect /dev/ttyXXX mip install usb-device-hid
Unfortunately, the MicroPython 1.19 version doesn’t support machine.USBDevice. I’m also looking for a solution right now.