It has been about three years since I had to redefine the buttons on a non-standard mouse.
At that time it was just a matter of adding a few lines to the xorg.conf file.
There have been a lot of changes to when/if/and how the xorg.conf file is used so I do not know if it is still possible.
I would just google "xorg" plus "mouse buttons". I suspect that some of the same references that I used back then are still to be found on line.