>A few months ago a few keys of the keyboard stopped working
For a couple decades I was running exclusively Thinkpads, and always loved replacing the keyboard because it made it feel like an entirely new laptop. It also usually was quite easy and inexpensive. Probably worth doing in this case if there are no good alternatives.
Unfortunately, the X1 Carbon is, due to the form factor, a bit tricky, but probably won't take more than an hour or two depending on your skill level. You have to go in through the back, and there are around 100 screws that need to be removed and reinstalled.
Could be worse though, I replaced a friends daughter's keyboard in her Dell, and that was a similar remove-the-motherboard operation, but the keyboard was plastic welded in place.