BetterTouchTool seems to be coming to the rescue here.
https://www.boastr.net/second-touchbar-alpha-available/
I haven't played with it yet, but it looks like as long as the thing you want to do has a hotkey you can use this to make touchbar button to do it whenever you are in that particular app.