Have you done any repairs? A fall is enough to brake something or just remove the connector. Software could even be a problem. Try installing ios 12 beta or the newest ios update. The ios 12 beta is a manual install. Go on youtube to see how it’s done.
There should be a problem with your screen. Did you clean the device by hand with alcohol? You should use a device called phone cleaner that uses ultrasonic sound to clean the motherboard.
Try booting while the device is charging. If the problem disappears, that means your battery is faulty. If the problem continues, there any many places to look at. First of all, there might be a problem with software, (if your tried rooting in the past). Other things might be the cpu or even the controller chip related to the sim. I recommend, trying booting the phone while plugged in, at first, and then search on youtube or google for posible problems. If you can’t fix it, have a professional take a look!
On the lightning port, there are at least four connecions. Two of them are for charging (positive, negative). The other two relate to data transfer. If your headphones work, you should also be able to connect the phone to your computer and see it (but not charge it at the same time). Just to help you understand how things work, the charging aspect of your phone, consists of the charging port, and a charge controller chip on and a flexible, secondary, motherboard-like part that is responsible for charging, speakers, microphone and some other sensors. This means that the fault could either be the charging port, or the charging controller chip. What ever the case might be, you will need to replace the secondary motherboard. It costs about 6-7$ in total for the part ( https://www.ebay.com/itm/For-iPhone-7-4-7-Black-Charging-Port-Charger-Flex-Headphone-Jack-Replacement/163108126228?epid=2502064173... ). However, getting someone to fix it should cost about 80$. It is a mediocre level of a repair. I recomend at...