OS X can natively set Caps Lock (or any of the other modifiers) to CTRL,ALT,CMD,Esc,Caps. in the Keyboard Pref Pane at least as of 10.13.
Of course Karabiner can do quite a bit more than that. But if you can't or don't want to install more software it's a choice available to you.
https://pqrs.org/osx/karabiner/
The equivalent for Windows would probably be AutoHotkey
https://www.autohotkey.com/