If you truly believe it’s just a connection issue, try disconnecting your screen and reseating it. If this fails, you more than likely are going to need to replace your screen. The reseating will be free as long as you don’t break anything, but a new screen will probably be just shy of a hundred dollars. Heres the screen replacement (with frame): OnePlus 5 スクリーンとデジタイザアセンブリの交換 the part: OnePlus 5 Screen
My recommendation would be to reinstall your old battery and see if the issue persists, as it sounds like you just got a bad one. I also recommend ordering the battery from iFixit if you haven’t. You may also have a charge port issue, but I wouldn’t worry about that until you’ve tested another battery out to make sure.
Disassemble the entire device and scrub everything down with 90+% isopropel alcohol, including your motherboard. Use a toothbrush to scrub. If this fails, there are some repair shops which can put your controller through an ultrasonic machine with distilled water that can clean it and possibly restore functionality.
Use a q-tip and some 90+% isopropel alcohol to clean around the button without opening it. Make sure to get down around the edges. If this doesn’t work, you’ll need to open the device to clean/replace the button.
You might have knocked the connection loose, bumped something on the board, or put too much stress on the flex cables while having it open and working on it. I’d inspect the board around the connections, the connections themselves, and the LCD flex cables.