i had the same problem yesterday. i was able to crack the issue and i am out of it now. i saw a small crack in the flex cable which connects the motherboard with the touch id. i had to replace the whole backlight assembly for one broken cable (unlike iphone 6 and earlier models).. for understanding more u can watch this video (link below).
later for solving slow boot i reinstalled the ios and both of my problems got solved.
https://www.youtube.com/watch?v=6XMA-hGIqys&t=568s