I can't find anything on this box. So, the cap. Can water flow up under it and into the pipe? I am wondering if it is some kind of one off manufactured stockman drain. If the answer is no, Then I would loose the cap and if you figure it out later cool, if not no big deal. I would run your box Herbie style. Let the shorter one become a siphon and the taller one will just catch what you choke the shorter one down to not handle. 5-10% of the flow. So, in your flex line you will need to install a ball valve near the end.
I hope that makes sense.