Short answer: no, not on Caps Lock.
This keeps coming up, so it's not just you. I think people (myself included) want to have a MX Lock switch on their board for the
factor. But Caps Lock doesn't quite work that way. When you press the Caps Lock key, the switch closes (KEY_DOWN) and then opens when you release it (KEY_UP). But the lock stays activated in firmware/OS until the next KEY_DOWN event. So if you had a MX Lock switch there, it stays down until you press it again. You'd have to do this: Press once, activate. Release: Nothing, switch is locked down (KEY_DOWN). Press 2nd time, unlocks the switch (KEY_UP), but the lock is still activated in FW/OS. Release: Nothing, lock still activated in FW/OS. Press 3rd time: Switch locks down, but now the Caps Lock deactivates in FW/OS. Release: Nothing, still deactivated. Press 4th time: Switch lock releases. Release: Still deactivated.
What you want to do with an MX Lock switch is something like Shift or Fn, that only functions while the key is pressed. Giving you Shift Lock or Fn Lock.