I do something similar, but simpler. I push a piece of tubing long enough to reach the bottom of a bottle in a #2 one hole stopper. Put the top end of the tubing in a tap and seat the stopper in a bottle. Open the tap. The bottle will fill about 1/3 f the way before pressure builds up and the flow stops. At that point, use your thumb to very slightly crack the stopper. The flow will begin again and you can control; the flow rate with your thumb on the stopper. When the bottle is full, seat the stopper and close the tap. I get virtually no foam doing it this way.