Well, a tank works for removing water because the velocity of the air "slows" as it enters the tank-simple physics. The pipe would just cause more "restriction" (friction loss), especially if black-iron was used-it will rust.
Not sure if plastic could handle the heat-when you compress air, you also generate heat.
