Essentially, I did a very similar thing. I smacked it against the wall a couple times and that sorted it for a little while but then it stopped working again. Also, leaving it for a day or two also seemed to work for me. I also hit the RB bumper on the wall and on my chair a few times, a little bit out of frustration and a bit out of logic. I’ve seen videos online of people fixing TVs and other various objects by hitting them so I did the same and it worked. I tried to take the controller apart but I don’t have the right screwdriver so I can’t really.
But, in conclusion, I smacked it