Control a dosing pump with raspberry pi zero w
This will be fine. 4x AA batteries is 6 V, so set your power pack accordingly. There's plenty you can do to make this better, but this will get you started. One caution, double check your +6 V is not connected to the Pi, it is likely to damage or destroy it.