How to disable the Esc key on the Touch Bar:
- Download Karabiner-Elements from GitHub, install it, and launch it.
- Under devices, in the “Modify events from this device” section, “Apple Internal Keyboard” is enabled by default. Also enable “No product name.” This is the Touch Bar.
- In “Simple Modifications,” klick on “Add item” and remap “escape” to, say, “left_shift” (or any other key that does no harm).
- Done. (Close Karabiner-Elements.)
If you still want to have an escape key that you can still access when you need it, you can then, for instance, remap “F11” to “escape.” This way, you would have to press “fn” + “F11” to execute “Esc.”