I had the same issue, my ES4 scooter had some weird quirks after I installed a sudo OEM 3rd party board. Flickering headlight, weird top speeds that'd seem inconsistent and constantly drop and rise slightly, eventually after one last E-break it started making noise and had reduced the motor's acceleration and break power significantly and caused a horrible noise. I replaced the front wheel motor with a different one thinking it was the motor, but the issue was the same with a different motor installed.
I took out the control unit and inspected it to find two blown tracks on the underside the circuit board. I used a small bit of bare wire and some solder to fix the broken tracks. This didn't fix my issue completely, it started acting as if the brake was constantly applied and would power off if I tried to use the brake or accelerator.
I reexamined the control board with a voltmeter and found the blown tracks I had just fixed had a short circuit across them. I removed a mosfet the blown tracks were connected to and the mosfet itself tested positive for continuity across all 3 leads, so it was broken/blown & the source of my short circuit. I desoldered a mosfet from a rental control board my scooter came with and soldered it onto the slot I removed the broken mosfet from on the 3rd party board. After I replaced that mosfet, the issues I mentioned all went away. The headlight doesn’t flicker or dim and the motor can accelerate and brake at full power, without that terrible noise.
Conclusion
My 3rd party board had a weak mosfet that slowly and eventually died after some use. This caused too much electricity to surge the following tracks and blew them like a fuse. After replacing the mosfet with an OEM mosfet and repairing the blown tracks with some wire and solder my issues disappeared.
If you decide to attempt this fix, make sure to drain the large capacitor on the middle of the board by taking a metal object with an insulated handle and touching it across both leads of the capacitor. It’ll make a decent spark so be sure to
do this away from flammables and be prepared to flitch a little
. Also handle the mosfets and board with care since a soldering iron makes everything it touches super hot.