But the best solution would be just to purchase a module on AliExpress, a connector for the light cables, terminals for the connector, some ring terminals and heat shrink wrap and make a dongle and put it inside the motor.
PHB-4R Rectangular Connector Housings by DLL. Features 2mm and 2mm. From $0.0268, in stock. Datasheet available.
www.lcsc.com
PH-RT Rectangular Connector Contacts by DLL. Features 0.05~0.33 and 22~28. From $0.0062, in stock. Datasheet available.
www.lcsc.com
View attachment 391115
You still need an external stuff to control the lights or at least a BMS with turning power off function. But if you want to control the lights from Bafang Display you need to figure out how it meant to control the lights (probably from CAN bus) and most likely design a module with an overhead like transistors circuits controlled from MCU to control the light module. And you can implement all bells and whistles like tail light with run mode and stop signal, turn signals and a bunch of other stuff. Of cause we are not going to do this since it is too much work and no-one is going to use it anyway.