I haven't found a way to configure Karabiner Elements to replace Caps lock with Escape when I only press that key (for vim) and with Ctrl when I press it in combination with other keys (for the terminal).
I also have both Shift keys bound to () when pressed alone and Shift when pressed in combination with other keys.