Your project is practically an example for Teensy boards. I made this exact gadget 10 years ago :)
Ultimately my friend was explaining his 'mouse jiggler' vbscript and I thought 'how can I make this a hardware version' this led to a design and once you have a design it is easy to query google for design hints at the component level "usb hid microcontroller" "usb passthrough [teensy|arduino]" "usb init host controller [teensy|arduino]" "mouse path [teensy|arduino]" etc etc
Ultimately my friend was explaining his 'mouse jiggler' vbscript and I thought 'how can I make this a hardware version' this led to a design and once you have a design it is easy to query google for design hints at the component level "usb hid microcontroller" "usb passthrough [teensy|arduino]" "usb init host controller [teensy|arduino]" "mouse path [teensy|arduino]" etc etc