On both of my boats the drinking water tank vents looped up high and went down into the bilge. I have over-filled my tanks many times and having the bilge pump turn on is a handy way to know that the tank is now full.
I don't understand the contamination issue. Bacteria don't move on their own or fly, so how would they get up and into the high looped vent and then back down into your drinking water tank? Even if the vent was right against the hull, AND you were heeled sharply with a full bilge "some" water could creep partway up the vent tank, but it would get flushed back out next time you over-filled your tank. I can't imagine any scenario where bacteria would go up the hose, over the loop, and contaminate your tank.
Extend the hose into the bilge and spend the rest of your effort on something else. Don't over-think this project.