Discord recently added “user installable apps”. You can configure it though the installation context. I have only implemented the usual server installable apps so far, so I don’t know what the apps in the new context are able to do. But it might be worth a look :)
I have a Keychron K3 Pro keyboard that can be programmed with VIA and I’m more than happy with it.
My mouse is a VAXEE Outset Wireless. This doesn’t need any software to change DPI / polling rate etc. All of it can be done by pressing buttons on the underside of the mouse. It works very reliably.