On the YouTube channel Phone Repair Guru they explained what could be associated with such a smartphone defect as automatic
Service Center Specialist in the release on PhoneRepair Guru drew attention to one of the problems that a worn out battery can cause. In this case, the smartphone may start to “fail”: it will randomly trigger display presses. You can see an example of such a problem in the video below.
A typical criterion for battery deterioration is that the smartphone turns off not at 1% of the remaining charge, but at 6%, 9%, etc.
To fix an iPhone XS Max, a service workercenter just replaced the battery. Oddly enough, after that, phantom clicks on the display disappeared. It is possible that if the display is not powered enough, the touchscreen does not work as intended. By the way, the malfunction manifested itself already at the stage when the battery capacity was 79% of the initial level.