Try using BetterTouchTool,
click on the 'Keyboard' tab ('Select Application' should be set to 'Global'),
click on '+ Add New Shortcut or Key Sequence'
click on the field and press the 'Shift-Escape' keys, a ⇧⎋ should appear
move to the right where it says 'Trigger Predefined Action' and choose: 'Keyboard keys/ESC (Escape key, respects pressed modifier)'
We've just created a substitute for the 'escape' key. Now we need to disable it.
click on '+ Add New Shortcut or Key Sequence'
click on the field and press the 'Escape' key on the Touchbar, a ⎋ should appear
move to the right where it says 'Trigger Predefined Action' and make sure it reads: No Action
I like this way more than deactivating the entire TouchBar.