I can't believe I've only just now discovered #HIDRemapper.
I've literally had an rpi Pico sitting unused for years.

It took me 15 minutes to build and is working great, so far.
https://www.remapper.org/

HID Remapper

I'm particularly happy because hidremapper provides a totally OS agnostic solution. While I was already able to remap buttons without issue on my personal Linux machine, the Win11 PC I'm forced to use for work doesn't have any sort of accommodation for key remapping.

Specifically, I really wanted to map the "back" button on my trackball to left click. Now I've not only got that, but I can also click two button together to bring up my clipboard manager (super-v).  Weee!