I love the Logitech hardware quality but I really wish they'd work on their software quality.
I'm using a G502 at work right now with Logitech Gaming Software and the two completely baffling decisions they made with that software on macOS:
1. It has to be running. If I launch it for configuration and hit ⌘Q it stops working and my mouse reverts to the default. I have to remember to close the window instead, which leaves it in the menubar.
2. I can't unmap buttons and have them act as generic HID mouse buttons. I can map buttons to mouse 1, 2, and 3, but I can't go past that. I can map buttons to various special functions, but it would be a hell of a lot more flexible if I could just have mouse 4 and mouse 5 mapped. For example, I can map the "sniper" button to Mission Control, but I can't change its behavior with keyboard modifiers, whereas if it was just Mouse 5 I could use the system configuration to map that to Mission Control and then use keyboard modifiers to change its behavior.
Fortunately, these mappings are persistent, so reconfiguring the mouse from a Linux VM, once and for all, was, for me at least, a reasonable alternative.
Unfortunately, the mappings are sufficiently persistent that I don't remember the name of the Linux (command-line) utility that I used several years ago to configure my G502, but a quick Google search suggests the Piper[1] GUI app may be up to the task.
Caveat: if you ever plan on using the mouse with Windows, bear in mind that the Windows HID mouse driver only directly supports buttons 1–5 (though I have observed that the remainder do generate events in the underlying driver stack, so you could hypothetically work around this limitation by writing a filter driver to remap the events, assuming no such driver currently exists).