Hi Björn,
12 regular flashes indicates an abnormal throttle
signal voltage
(either too high or too low).
If the 4.5V at the throttle connector is on the signal wire
(not the +5V wire) when you turn on the battery power, this would cause the error because the controller expects a throttle signal voltage of 0.8~1V with the throttle released, or 2.25~2.5V if the controller is set for a boat style throttle with forward/reverse and Neutral in the mid position.
A safety feature of the controller automatically prevents the motor from starting if the throttle is not fully released
(or in the Neutral position) when the controller is initially powered up.
As you are using a potentiometer instead of a Hall effect throttle, the maximum
and minimum signal output voltage is likely to go beyond the upper and lower limits that define the controller's acceptable working range, and this will probably cause the same error code 12.
Resistors could be placed inline on the +5v supply and the ground connection of the potentiometer to ensure the signal voltage remains within the required range.
I would suggest a 1.5k resistor on the ground wire and a 2k resistor on the +5V wire as shown below:
With a 4.5V supply this should hopefully give a working range output of between 0.8V and 3.5V from the potentiometer, or between 0.88V and 3.8V with a 5V supply.
Alan EDIT: Diagram added