I have seen this kind of problem a few times and diagnosed the screen to find no faults with it.
In my experience this is caused by the memory (or storage) on the device being faulty, full or close to capacity.
Faulty - As your phone is a iPhone 5s, then it is relatively old (around 4 years old), the phone stores it's data on something called solid state memory, 4 years ago the technology for solid state memory was not good compared to now. The MTBF (Mean Time Before Failure) of the memory was quite low initially and over-usage promoted the MTBF to become shorter by constantly using read/write cycles of the memory. Unfortunately this causes things like data corruption and bad sectors, which ultimately cause slowness and eventually total failure, it is inevitable.
Full or close to capacity - If the phone is not running on the latest firmware then your phone may be trying to download the latest firmware updates. If there is no room for the update the phone will constantly recycle the last block of memory with the latest block of the update causing the phone to slow to halt. If the phone is full, then there is your problem. In both of these cases removing unneeded apps and data (music / photos) may free up enough room for the phone to work again properly.
Hope this helps, good luck.