System Preferences > Keyboard > Keyboard > Modifier Keys... > Set Caps Lock Key to Escape
Hence why Seil/KarabinerElements is the first thing I install on a new Mac.
https://github.com/tekezo/Seil/issues/68#issuecomment-250195...
I really did not expect Apple to finally fill this gap that has been around for so many years.
I was using Karabiner to set caps lock to control AND escape when pressed independently, something extremely useful to use Vim and command line. This doesn't appear to be supported, unfortunately.