The product page says "Hydraulic Disc Brake" and I don't see any wires. It looks to me that it works purely mechanically. I'm no expert on e-bikes but i don't think you can control this digitally.
You can use it for a brake light but if connected to a motor controller, you can also switch off the motor.
I already found the solution in another forum:
An ATTiny85 microcontroller could do the job. Take a transistor, hook the emitter to ground, hook the collector to the e-brake cutoff line, and hook the base through a resistor (around 1kohm) to another pin on the AtTiny.
With this setup the brake status could be changed from a MC as required.
What would be more suitable and efficient for a ESP8266: a BJT, a MOSFET or a relay?
Because most of the time the brake status is "not set", power should only be needed if
the brake status is set to "brake is set".
Probably by choosing between pull-down or pull-up this could be possible.