The majority of “d” keypresses register, but a minority don’t. Anything I can do?
For a mere mortal such as yourself, see if you can dislodge whatever dust or debris may be stuck in the keyswitch. Try hold it upside down and shake it. Also try compressed air.
Unfortunately, if the repair requires cleaning the keyswitch contacts, I don’t know if that is actually possible. If it is possible, it is going to have to be done by someone with specialized training - definitely not easy.
According to iFixit the Magic Keyboard uses scissor-switches similar to the 2015 MacBook.
It looks like the key-cap can be removed and replaced, but is has some really tiny clips, so it would be easy to break one. If the debris causing your problem is visible there, great - blow it out and you’re done.
If you need to go deeper, then the plastic scissor might be removable if it’s like the mechanism in the 2015 MacBook. But the photos seem to indicate that that’s as far deep as you can go if you want to be able to reassemble it again afterward.
My recommendation: If you can fix it with compressed air and some shaking, don’t try anything more intense. The risk of damage is just too great. And don’t bother with a repair shop - the labor cost will be more than a new keyboard.
If your keyboard is still under warranty (or AppleCare), consider taking it to an Apple Store to see if they can just replace it or if not, to get an estimate for a paid repair/replacement.
I had a magic keyboard, the extended one. They warp. Most of the keys on the left side eventually stopped working and it wasn’t that old (but out of warranty).
Compressed air and some inverted tapping of a corner on the (physical) desktop revealed a small hair – probably a cat hair – protruding from under the key. I was able to remove that. Too soon to be completely confident, but no problems since!
(This post has nine instances of the letter “d”!)