I fixed this piece of shit, I think.

TIP for anyone having problems with double input on the micro switches of their Sanwa joysticks:
>open the joystick
>open the cap of the faulty micro switch (note that up-down and left-right are reversed)
>connect the open controller to your computer (being careful not to fuck everything up)
>test it.

In my case, without the cap that keeps the micro switch closed, everything worked perfectly. I assumed that when that micro switch was closed, something inside wasn't exactly where it should be, so I pressed everything to make sure they were properly fitted and closed the micro switch with its cap again.
Now everything is working. Let's see how long it lasts...