Michael,
To be honest it could be any number of things as the HVAC systems in this type of vehicle can be quite complex. These range from low AC gas, low engine coolant, perforated hoses /pipes, corroded / blocked condenser units, bad thermostat, faulty blend door actuators, dirty cabin air filter, HVAC control unit malfunction, faulty temperature sensors etc, etc. I suggest you start with a good look round and check your coolant level. Also, check when the AC gas was last serviced and weather or not it is due. You could also try and inspect the air filters. If all of the above check out, when was the last time you had your battery checked out? As a 2015 model, the battery is now 7+ years old and Panamera’s are noted for being particularly sensitive to battery condition.
It might also be worth reading up on some of the forums such as Rennlist and 6SpeedOnline for additional support. You mention that the problem is intermittent so it could be a sticky diverter flap or actuator. Failing that, you will need to ask your local OPC or independent specialist to have a look as its could be any number of things as I’ve already mentioned.
Hope this gives you some pointers and that you manage to get it sorted. Let me know how you get on.
Best regards,
Randall