The G4 halogen and its lampholder must be the crappiest system ever devised by an incompetent. I see that it's now possible to buy LED replacements for G4 bulbs. But the problem with G4s is not the bulbs, it's the lampholders.
I used to have G4 spotlights under my kitchen cupboards. After 2-3 years I found that they no longer worked, even with new bulbs, presumably because the contacts in the lampholders had corroded. Fortunately, new G4 spotlights are very cheap, but it's a pain in the neck to have to keep screwing new ones to the cupboard, so I replaced them with LED tape.
This isn't a solution for the ceiling lights that contain multiple G4s, only half of them working. Insert a new bulb, and it still doesn't work. Wiggle the new bulb around, and it works intermittently. So now I have to replace the entire light.