The buttons seem to be worn down to the point that they don’t work reliably inside the shell…but work pretty consistently when the chip is outside the shell.
My theory is that the shell buttons are not making proper contact with the chip buttons ?
Your diagnosis sounds correct to me but cleaning contacts is a very simple task, no need to replace them yet.
The buttons on FOBs, calculators, cordless phones, digital timers, and TV remotes all collect dust and dirt from being handled and this grime eventually works its way inside to impede the electrical contacts.
I'm certain you can find many YouTube videos that will demonstrate how to disassemble and clean the contacts inside the FOB.
Carefully open the FOB, remove the buttons or one-piece tray, (sometimes the buttons are individual pieces, other times, they're single piece with all the buttons), use a Q-tip with rubbing alcohol to wipe the copper contact on the PCB and don't forget the inside of each button.
If you don't have rubbing alcohol, peroxide will work or you can clean the PCB contact using a pink pencil eraser.
.