Unfortunately I’ve had this to me a few times after a battery replacement and 9/10 it always comes to the touch ic chip on the board. If you can replace yourself, cheap fix otherwise if you have to take to a repair shop they usually will tell you to upgrade as it isn’t worth the repair as it is a very common fault.
I have come across this problem once before at work with the 11 pro, unfortunately the device must be repaired through apple so that it is covered and returned fix otherwise you can replace the front facing camera with a third party one but will not have facial id anymore. the restarting of the phone is caused by the faulty camera.
You have unfortunately damaged the LCD within the phone. Thus causing the flickering or permanent black or green line. If you turn the phone off and look under extreme light you will notice a crack on the LCD. Best option for this is a replacement screen.
Unfortunately the LCD is damaged and will require a new one. These screens are very thin and easy to break and yes it does happen to everyone too. When letting it set I do recommend LCD clamps like the one in the photo bellow to get best results.
Given the age of these devices and depends what quality cords have been used over its life, I would recommend a new battery for this device but you do run the risk of damaging the screen so best thing to do is take it to a third party repairer to do it or if you are confident enough to do so.
The piece you are talking about is the bracket that holds the lcd and glass together and holds the screen in place in the phone. When you replace the screen these are already pre built on the screen. You could choose to replace it but that requires lots of heat and a very steady hand. Best thing to do is to replace the screen.
There are a few things to rule out. In my past experience it would be best to test all parts so disconnect the front camera and test then the rear and finally you could rule out that. Once one camera goes usually both stop working is what i have had in the past with apple. it may be the front camera needing replacement and don’t worry you wont lose facial recognition from that.
You may have to replace the dock in the device as for videos it uses the mic next to the camera for default apps and when using 3rd party apps it will use the mic in the dock. Test the voice recorder app on the phone and if it shows no change in pitch will need a new dock.