Simulate trackpad gestures like pinch to zoom?

Is there any way to do this?

The software that comes with Logitech mice can configure things like using the side scroll wheel to zoom, but I don't know if it's doing some translation of the scroll wheel itself on the Mac, or more likely just reconfiguring the mouse to send some kind of HID zoom events.

I found a program GitHub - intitni/AbnormalMouseApp: An app that enables you to swipe, zoom, and rotate with a normal mouse in macOS. which allows doing zoom, rotate, etc with a normal mouse. That seems to indicate it should be possible for KM to generate such events.