Just an update on my saga:
The new controller I bought works perfectly. So probably not software after all.
Good luck on your issue. I will be ripping my old controller apart at some point and will try to do an investigation.. I'll let you know what I find, if I find anything. Since mine worked sporadically near the end.. I am thinking it might maybe simply be a bad/loose ribbon cable as seen in this video.
I've ripped apart and fixed many a laptop, etc.. so this is child's play for me. If it is this for me, like in the video, then I bet your's is the same as well and then you could simply take your controller to a laptop or phone repair place, show them the video, and get them to fix it. What they show in the video, I would think any electronics repair place should be able to do.