If your compressor is overheating as you say, then you either have a comp. going bad or there is a blockage somewhere in the refrigerant line, condenser, evaporator or capillary tubes that is causing a restriction that will overheat the compressor and causing the shut-down due to lack of refrigerant entering the unit. If you have an AC amp clamp, you can do a running amp test on the compressor to check how much amperage it is drawing and compare it with the data plate. Otherwise, it sounds like you need a qualified A/C tech to look at it to verify if there is a blockage or not.
One other problem might be the run capacitor, but I have never seen one shut down a comp. after an hour. They usually act up right away.
Lew Farber...RVIA Certified Master Tech...ABYC Certified Master Marine Electrician
MASTER TECH ENERGY SYSTEMS, INC.
AM SOLAR ...MAGNUM…VICTRON ENERGY...LITHIUM & LIFELINE BATTERIES…MARINE REFRIGERATION