Just a heads up in case anyone else’s Logitech Performance MX starts acting up on the middle mouse button: The switch used is an E-Switch TL3315NF160Q.
Apparently sometimes a drop of hot-glue is enough, but in my case the switch itself was broken. The linked tutorial does give clear instructions on how to reach it though. If you’re handy with a hot-air gun, it’s easily replaced 🙂