Hi - based on this post - How to access libinput properties in Wayland for an external touchpad? - #2 by jpetso - it sounds like the underlying method is using D-Bus to send the configuration to KWin, which then changes how libinput is used.
I’m far from a developer myself, but if you know how to work with D-Bus then it seems possibly feasible?