Sounds like the batteries are probably the problem. I had to change the batteries in my phones recently. They don't last for ever and 3 years is probably about right. New batteries in my phones cured all the problems like 'Out of Range' messages and cutting out after a very short time.
OnePlus 5 review