Earlier quoted context omitted.
There are many ways to rebind caps lock to be escape on press and control when used in combination with another key. Karbiner elements on macos and xcape on Linux come to mind immediately. But some keyboard firmwares are programmable enough to do it themselves too. However. What I found best as a vim user was to use ^[ as escape. It has the added bonus of actually being faster to process by vim too.
You don't need any extra software to map Caps to Esc on X11: Just enable the caps:escape option. In context: https://github.com/majewsky/system-configuration/blob/6c4478...
ESC if pressed once.
CTRL it pressed with another key.