there's an industry that deals with this problem:
Poly pipe is pretty good for being non-porous and difficult for much to grab onto or grow inside - Oil & Gas uses poly lined steel pipes frequently where microbially induced corrosion is an issue (various extremophiles that live in the reservoirs that like to eat iron and shit acid, etc).