Right! So a brass pressure valve can be used to make a lossless overflow!
In this example, the top blue drum had 64 buckets of water. It all went to the center bottom drum by pipe without loss. When 4 more buckets were added, the overflow went to the right drum under the pressure valve. There is still about 200ml floating in the pipes.
Thanks @laurynasl and @Gregorius for the tip!