Chosen Solution

My sister’s MacBook’s keyboard and trackpad suddenly stopped working. So I did the following: Downgrade from Catalina to Mojave and upgraded againTried Windows 10Replaced the trackpad cableSMC resetNVRAM reset None of this solved the issue for me. Then I left the MacBook for a couple of days with the battery unplugged from the logic board and suddenly it worked again. I also tested a reboot of the system and both keyboard and trackpad still functionend. Since the cable was not properly glued to the battery, I unplugged the cable and glued it to the battery with the adhesive tape. After this, the issue is back again. If I leave it for a while I expect the trackpad to work again. Does anybody know how this could happen? Thank you EDIT: Added battery status

You shouldn’t need to tape or glue any cables! That could interfere with the removal for repair or damage things. This sounds like the classic case of a squeezed cable! What happens is the battery over time swells up pressing on the trackpad & keyboard cables. I would first run this gem of an app CoconutBattery to see what the health of the battery looks like (post a snapshot of the apps main window here for us to see as well  Adding images to an existing question You could also take the bottom cover off and check it as well MacBook Pro 13" Retina Display Early 2015 Battery Replacement compare it to a good battery like this one

Note the surfaces are flat across each cell. Even after replacing the battery you may also need to replace the trackpad cable MacBook Pro 13" Retina (Early 2015) Trackpad Cable Update (08/01/2020) Well the battery does need to be replaced as you are near the end of the batteries life of 1000 cycles! Some batteries knockout sooner! Determine battery cycle count for Mac notebooks Did the system get a liquid spill at some point? Thats about all there is. You may need to replace the trackpad its self as it could be messing up the internal USB data lines.