It's fine to use the cold water inlet as a hot water heater. CPVC should be the material used for the hot water lines. This is what is going on. At a temperature of 140 degrees, vinyl chloride begins to degrade.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.