Is there a thing that allows you to easily control which way down a pipe water can flow
Evidently. One of several rsults of searching for reversible check valve. Image from flow-rite.com, no affiliation, never heard of them

However, I'd suggest re-examining the entire design. When complexity leads to wanting more complexity, it's more often an overly complex design ethos than a need for complex parts.