This article describes how to quickly and easily remap your MacOS keyboard to better suit your needs using only the command line (i.e., without needing to install any additional applications).
TL;DR: Enter the following command in a terminal on your Mac to remap Caps-Lock as Delete, and remap Delete as Escape:
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x70000002A,"HIDKeyboardModifierMappingDst":0x700000029},{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x70000002A}]}'
But why would you want to do this? A couple of quick examples targeted at writers or developers: If you are using a modern IDE or code editor (versus 'vim' or 'emacs'), then you may wish to map the very convenient but seldom-used Caps-Lock to the oft-used Delete function. Or if you are editing using vim or emacs, then you may wish to map the Caps-Lock to a commonly-used modifier key such as Ctrl. Or maybe you are just a normal person that tends to not type many acronyms