One of the main oil production complications is that asphaltene-resin-paraffin deposits (ARPD) are formed during production wells' operation. This is an urgent problem in the oil and gas industry, especially in the fields of the Ural-Volga region (Russia). This study aimed to develop a technological solution for the effective thermal treatment of deposits based on the wells' thermal state calculation during a sucker rod pump operation. In practice, the thermal effect on ARPD is carried out by flushing-out with a hot agent (water, oil). Traditionally, flushes are carried out through the casing annulus. However, this method is ineffective due to large heat losses and the impossibility of heating the inner part of the tubing in a sufficient way, where ARPD is deposited. Dynamic modeling of the process was performed in the ANSYS Fluent software product. The heat problem was solved on the basis of the Navier-Stokes Reynolds-averaged heat and mass transfer equation. It was noted that the temperature of the injected agent (hot oil or water) affects the temperature of the tubing's inner wall to a lesser extent than the coolant flow rate. It has been established that it is impossible to reach the melting point of wax at the submersible pump level. The flow rate of the coolant affects this parameter more intensively. When flushing with hot oil 120°C with a flow rate of 300 m3 /day, the temperature above the pump will be equal to the wax melting temperature. Calculations indicate that it is most advisable to use oil heated to 120°C as a coolant for flushing wells than water with a 90°C temperature. The implementation of the methods proposed can be used on any well equipped with a sucker rod pump.