1) I think anything that Autoit can DllCall with should be doable though I'd need to really study and play around with how the API works to get a good idea of how it could be integrated or if it is more appropriate as a separate application. It seems that DirectInput is generally deprecated nowadays, Microsoft suggests rawinput for message-based devices like Mice/Keyboard, and XInput or directly querying HID file for state-based devices like Joysticks. It would definitely be interesting to experiment to figure out why older games that used DirectInput have issues such as dropped inputs etc.
2) Thanks for pointing that out! I definitely want to figure out how the least possible latency overhead could be achieved for accurate timestamping of input events. Pretty much all frameworks like SDL2 used by games all seem to use a polling based approach for message retrieval, which makes reliable timestamping impossible. It is due to this flawed polling philosophy that esport games all need framerate far above refresh rate because, despite Windows already providing the machinery to accurately sequence user inputs, commercial game engines just dump all the work into each frame and so you actually lose input-order information within a frame. Particularly notorious is Valorant's clunky aiming despite Riot's self-congratulatory "esport-focused optimization" that mostly just made things worse, like reintroducing floating-point camera jitter because they changed from UE4's default quaternions into successive rotation matrix multiplications.