set up Caps Lock as a shortcut for changing the input language
Yes, you can use Caps Lock to change input language without third-party software.
All you need is a custom-made keyboard layout (usually made with Ukelele ) that has two alternative sets of characters bound to Caps lock=on and Caps lock=on and Shift=on states.

Pros: zero-lag, no weird key remapping hacks needed
Cons: buit-in input source indicator becomes useless, looking at the Caps LED is not very convenient for touch-typists.

To mitigate the "cons" I use lightweight third-party app called Capster that changes the icon in the menubar depending on the Caps lock state.
I also use small Applescript to disable Caps lock delay.

I'm using this method for many years and never looked back.

This is my bundle for Russian language (with additional Ukrainian characters bound to alt+key)
https://github.com/falcn/Caps-layout