That is a defrost problem.
You have a bad part. There are three basic parts in a defrost system.
The defrost heater, the defrost thermostat, and the defrost timer.
The defrost heater could be bad, but more likely its the thermostat or timer.
This is the defrost thermostat. If you check it when its got frost on it, it should be "closed", in other words very low or zero ohm reading so it completes the circuit to the heating element so it can heat up.
Whirlpool R0161088 Thermostat, Defrost - AppliancePartsPros.comThis is the defrost timer. Its basically a clock with electrical contacts. It sends power to the compressor for a certain number of hours (6, 8, or 12) depending on the refrigerator design. Then it switches to defrost for 20 to 30 minutes (also depends on design).
Whirlpool R0131577 Defrost Timer Kit - AppliancePartsPros.comYou can test the defrost system by manually turning the defrost timer with a large straight screwdriver. It will click along until you hear a slightly louder click and then the element should start heating. If it doesn't it might be the defrost thermostat or defrost heating element.
Like all clocks it can stop turning or run slower with age.