As all other answers, I suggest to not rewind the motor and work with motor connections. As your question mentions to "electronically reverse", and previous answer uses switches or relays, following schematics uses a series winding with a rectifier, and a H bridge to reverse motor brushes.
This example uses high side PMOS to avoid a boost supply. Also you can explore to control the speed/torque if you use PWM signal for the optocouplers signals.