Call 1-800-my-APPLE and tell them what's going on. That really is broken. May be something that will get you a replacement.
My old 6 was doing that ..... took it to get a new battery as it was old and dropped a charge fast. As well it started to lock up, touch screen wasn’t working. A hard restart was only solution. Anyway the tech kid at a local shop listened to my description of the devices woes and then said it was a problem with just the iPhone 6. He said he’d love to sell the parts to me and install a new battery and touchscreen but it wouldn’t fix it ...... woe wuz me thus I bought an X .