Why does one need this on macOS (which has had a dedicated toggle for this in System Preferences for a few versions now)?
* Start app 'System Preferences'
* Pick 'Keyboard'
* Click button 'Modifier Keys...'
* Per keyboard you can now configure what the caps lock key does. One of the options is 'escape'. Which is what it should be :)
The other operating systems just are described how you can do the change without the tool, see https://github.com/susam/uncap#mac-system-preferences