I haven't found anything that gives me pause about the pipe used for heating the pool. PVC (Poly Vinyl Chloride) is white. Black PVC is actually ABS(Acrylonitrile Butadiene Stryene) pipe. Both have good to excellent ratings interacting with Trichlor and Calcium Chloride.
If you can divert the pool water from going through the ABS piping, that would tell you definitively whether the type of pipe has any effect on the chlorine. But if you've had this heating system for years and haven't had a problem then my guess would be that the type of pipe isn't the culprit.
Heat and sunlight are the two biggest enemies of chlorine in pool water that doesn't have any other problems, like organics growing. Stabilizer, CYA, protects the chlorine from sunlight. High water temperatures can cause chlorine consumption to go up. But even higher water temperatures can't account for losing 2 ppm of chlorine in an hour.
I don't know what setting you have the automatic chlorinator set to, but adding 1 gallon of 12.5% chlorine, by itself, to 28000 gallons of water should have raised the chlorine level to 4.5 ppm, not 2 ppm.
Leaving the issue of the piping aside, I can only think of 3 things that would cause chlorine readings like this.
1. Low CYA level (I'm talking below 25 ppm)
2. High CYA level (70 ppm and above). High levels of CYA require much higher chlorine levels to do the job of sanitizing the water. This is referred to as chlorine lock. You can read more about this in this InyoPools Article . And FYI, 3" Trichlor tablets weigh approximately 8 ounces. Each tab is stabilized. Each tab raises the CYA level in your pool by 1.1 ppm. That's why it's so important to have an accurate CYA reading.
If the CYA reading of 40 ppm is accurate, then 1 and 2 don't apply and that only leaves organics in the water (algae, combined chlorine, bacteria, viruses, ammonia, and other organic contaminates).
It's possible to have organics growing in the water even if the water is clear. A combined chlorine or total chlorine test should reveal this.
In that case you should shock the water and maintain the shock level until the water holds chlorine.
The shock level for water with 40 ppm of stabilizer is 16 ppm. The best chlorine for this purpose is liquid pool chlorine. And you should turn the automatic chlorinator off until the process is complete.
3 gallons and 85 ounces of 12.5% chlorine will add 16 ppm of chlorine to your pool.
29 ounces of 12.5% chlorine will add 1 ppm of chlorine to your pool.
You will need to take chlorine readings every few hours and add enough chlorine to maintain the shock level. I see that you have a test kit but if your kit can't read high levels of chlorine you will need a FAS/DPD chlorine test kit or you will need to take water samples to the pool store for testing...but you will get a much more accurate reading if you do it yourself.
The pump should run continuously during the entire procedure. Be sure to backwash the filter when the filter pressure dictates.
Let us know if you have any questions.