The wireless trackball I'm using is the Logitech M570. It has a combination scroll wheel/middle button; however, over time this button began to get flaky. There would be weeks where the button wouldn't respond at all, or would only respond to exceptional force. Looking online, this seems to be a common problem; the device is somewhat cheaply made, and the middle button is not the usual high-performance switch, but some lower-quality part.
I set out to determine whether the button could be replaced; I was successful, and my procedure for replacing it is outlined below. The new button is slightly stiffer than the old, but it works consistently.
Button Replacement Procedure
Disassembly
First, pop the blue trackball out. Then, there are five screws holding the shell together; remove them. Note that one of these screws is beneath the sticker in the battery compartment (shown below).
With the shell off, you'll need to remove the circuit boards. First, detach the ribbon cable leading to the trackball reader (the gold bit in the middle of the image below); to do this, you'll have to pull up the plastic locking connector. Then, remove the four screws which keep the circuit boards on the lower shell, and pick up the circuit board assembly. Take care not to bend the battery wires as you remove them from the lower shell. The middle/scroll wheel button we're going to replace is just in front of the ribbon cable.
Old Button Removal
In removing the old button, we need to be careful not to damage the rest of the circuitry. Note that our task is made easier by the fact that we don't care what state the old button ends up in. The method I used to avoid damage to the surrounding circuit is shown below; first, I used a diagonal cutter to cut the two forward leads on the button. Once this was done, I gently rocked the button up and down to weaken and then break the remaining two leads of the button and remove it (I did not cut these leads, as there were difficult to access without risking damage to the rest of the circuit).
Once the button is mostly removed, I used copper solder wick to clean up the four holes that the leads of the button formerly inhabited.
New Button modification and installation
If you were paying close attention during the old button removal, you'll notice that the leads were pretty much vertical. The buttons I had on hand were very similar in size and function (normally open, leads paired length-wise); however, their leads were gull-wing SMD style (MOUSER link). Before I can install it, I need to manipulate the leads into a more vertical configuration, detailed in pictures below.
First, push the leads down.
Then, use pliers to straighten the leads downward.
Re-Assembly
Just reverse the steps in Disassembly. It is important to make sure that the little plastic power button in the lower shell is lined up with the switch on the circuit board before screwing everything back together (the switch is the silver-and-black affair on the lower right of the picture above, just in front of where the battery clips attach to the circuit board).
It is interesting to note that Logitech uses Nordic Semiconductor radios for their wireless links (at least for the new-ish unified receiver).