It's honestly best to buy a new gamepad. Sometimes after time, buttons wear out, it causes you to have to push harder to make it work, or sometimes it'll just stop working all together. You could clean the motherboard with alcohol, and then purified water, and let it air dry for 3 days to avoid frying it once you plug it back in, but it's best in my opinion to just buy a new one. There's a few sites out there that give great deals on gaming supplies, so with a bit of research, you might even be able to find a good deal. Try Amazon and other similar sites as well, you never know what's on sale
I would try clean it before spending more money on a new gamepad, I had exactly the same issue when Dying Light came out and the RB was constantly getting mashed, i noticed it stopped working completely due to built up body fat/sweat between the buttons, once cleaned all works great again.
LOL, yes just about anything in there will make it play up, dust, food, spilled drinks, sweat, body fat, dirty hands, grease etc Takes about 10 mins to pull apart a controller, clean it and put it back together again. Mostly all held together by clips but will need a Torx 8 for 5 screws, use a good cleaning agent, i use isopropyl alcohol on mine
Can't forget about that little sticker hiding another screw if the little sticker is there, haven't got an Xbox One yet (Waiting for the final model version of it) so I haven't taken apart one of their controllers yet