@pluralistic As a test for hardware vs. software issues I'd be tempted to connect two mice, with the sensor taped up on one so it can't detect movement. Then move the one with the working sensor, remove your hand, pause, click using the other mouse, and watch for exactly when it jiggles.
I've had a mouse do this with a fairly repeatable movement. It was missing a glide pad after a repair, and tilted when I clicked, detected as movement.