I’m incredibly confused about how you’re supposedly to measure liquid laundry detergent with the cap.
You just gave me a stupid idea. First measure out the exact volume of detergent you need for one load - eyeballing it I'd guess 20mL (I'm notoriously terrible at eyeballing volume, so, grain of salt) - then get a 20mL syringe and some IV tubing (it's got one-way valves, so when you connect a syringe to it and draw up, it pulls from on side of the line; then when you depress the syringe back down, it goes out the other side). Tie something heavy to the intake side of the line and throw it in the bucket of detergent. Run the other side of the line to just above the detergent receptacle if your machine has one; or near the door for you to just aim it.
Load clothes; pull syringe, push syringe, close the door, run the machine. No detergent dripping all over the place!
...detergent is probably too viscous as-is to go through IV tubing at an acceptable rate, so you'd probably have to dilute it with water first to thin it out, then adjust the amount you pull accordingly.