Have you tried a new power flex cable? Disconnecting some parts on the iPad 7 and newer can cause some weird things to happen. For example, if you booth the device with now digitizer connected, the device will ghost touch even though there isn't a touch screen installed. Thinking that may be the case with your device in the scenario of having the bad power flex or no power flex connected. There is also the possibility that the impacted that damaged the power button also damaged the board which is causing the boot loop. I would start by trying a new power flex and if that does not resolve, look into board repair as a second option.