I would imagine that a well stocked hardware store would have a proper fitting rubber cap, and with a bit of heat shrink tubing would work nicely.
But the main reason for my posting is that the E-bike brake serves a very important role of disengaging the power to the motor when actuated. Emergency stopping comes to mind where you don't have time to think, and you don't want to be fighting the motor...
But if you have already considered this I'm sure there is a way to hook up the cut-out switch to a hydraulic lever system.
Be safe,
T.C.