Why is pex not recommended? I’m a plumber and we build houses with pex for hot and cold water lines with copper stub outs. You can put pex directly to the heater but it just looks terrible and unprofessional so as a professional, we don’t do it. Of course homeowners can do whatever they want lol. We always transition to copper and put on flex lines like the cold side has, the only pipe you shouldn’t use for hot water is regular PVC. But you can use CPVC for hot water and cold, and regular PVC for cold only. The flue vent won’t heat up your pex line, sealing off the joints isn’t necessary, by code you need 3 self tappers per joint. As long as there is no obstruction on the termination of the vent pipe, it won’t produce much heat outside of the pipe, thought it will be hot to touch. The space between the flue vent and the heater sucks in oxygen to help vent the heater and if the vent termination is blocked it will start pushing out exhaust from there instead and begins melting things.