It helps if you have a way to monitor scrolling events and a way to disable the problematic pointer device temporarily. I do not know how you do it in Windows and macOS. Even in Wayland it seems to be impossible to disable only a pointer device, if the device is pointer & keyboard combo. But in X11 it can be handled well.