I would like to remove all the keys on the touch bar except the escape key.
System Preferences -> Keyboard -> Touch Bar shows: Quick Actions Press Fn key to: Show Control Strip
After that you only have
Configure in: Extension Preferences buttons on the Touch Bar, while quick actions are accessible through pressing the hardware
Now, the question is how to also remove that
Configure in: Extension Preferences button as it still results in accidental key presses, but at least it only shows a preferences window, which is easy to quickly close with
After killing the Touch Bar server application it worked like a charm. I follow what described in this topic : https://apple.stackexchange.com/a/382627/363577