(That doesn't mean you need a spare new macbook pro. An older device that is maintained, and a good environment setup process, is sufficient.)
Apple: you need to go back to the drawing board and redesign the keyboard. Stop chasing thinner/lighter. The keyboard is the primary interface programmers use. It should be sturdy enough, and have enough key travel, to hold up for the life cycle of the laptop.
Mine was out of warranty, so I fixed it myself.
Failed: compressed air Failed: cleaning under the key.
Success (but not recommended) I removed the key, then pulled off the glued membrane. Cleaned all with 90% alcohol. Took a new membrane (but you might be able to use old) and used E6000 and a toothpick to glue it back. Replaced butterfly and key.
Not a good solution, but it worked.
It looked like the contacts were getting coated and not making good contact? Perhaps heat?
Best of luck.
I can crank out a site fairly quickly but I also want it to be as low-maintenance as possible.
https://www.youtube.com/watch?v=4KuVvb9DTaU (from about 5:20) talks a bit about what's involved in an actual keyboard replacement, if you ignore some of the histrionics.
I think from what I've heard that for actual replacements, Apple will swap out the whole 'top case' subassembly, which could be a 4-500$ part if it's not covered under warranty.
The fact that at some point I'll have to take it back to Apple and probably be without it for several days due to the complexity of the repair makes this 10x worse - I am freelance so need this machine for work, so being without it (especially for such a seemingly trivial reason) is unacceptable and absolutely not what I expect when I buy Apple (previous Macbooks have worked for years without a single issue).
If they release a redesign, I'd swap it in a flash (I do actually quite like the keyboard to type on otherwise, but seems like the quest for thinness has gone too far this time!), but if this problem is as widespread as it seems who knows what it will do to resale values.
Would be great to get talk of this spreading as far and wide as possible, as judging by anecdata on Twitter and elsewhere, I am far from the only one with these kind of issues, and to me that implies a fairly major design flaw.