Remove Escape on TouchBar in Safari
You can use Karabiner-Elements [1, 2] to map escape key to some other functions with visual feedback (e.g. mute). The feedback helps to remind you that the key is not longer mapped to escape. 

You can then map a less useful key to escape. For e.g. on a US keyboard, the section (§/±) key is on the top-left corner where escape key could have been.


Install and run Karabiner-Elements.
In Simple Modifications, choose No product name (No manufacturer name) as Target. That's the touchbar. Then add item, from escape to mute.

To map section (§/±) key to escape, choose Apple Internal Keyboard. Add item, from non_us_backslash to escape.



Source