Two joycons for the Switch and though the thumbstick worked fine, none of the buttons worked.
I had assumed it was a loose connection, but it turns out that the shoulder buttons - L and R - had been crushed (from heavy usage), which looked to have caused a short which knocked out all the buttons.
It was simple to test by removing the crushed buttons from the PCB and the rest of the buttons came back to life (during the test).
The right joycon is trickier because the shoulder button is directly soldered to the PCB and it being crushed meant that the pads had all been ripped, but I managed to expose the super tiny traces and solder to those. But in future, there's easier contact points to jump to.
Otherwise, now all the buttons work, and TIL: mash the shoulder buttons can equate to a totalled joycon!