Why do you take off the rear cover? Have you done some repairs with the MBP by yourself? Since your MacBook Pro can't boot up properly after every time you put back the rear cover, I guess that your MacBook may have certain hardware issues on the logic board. And you also point out that the built-in battery has something wrong as it cannot be charged.
Since your Mac can be booted up after removing the rear cover at present, you'd better rescue your files as soon as possible. Once your MacBook won't turn on at all during your later fixes, it'll cost you a lot to ask a data recovery lab to repair your Mac to give you a chance to restore files from the computer.
You can use iBoysoft Mac Recovery Mode. This special mode can help you get files off an unbootable Mac by running only one command. After rescuing the data from your MBP, you can try to change the battery first and then use the new charger to charge your MBP for at least 30 minutes. Then, put the rear cover back to check if it can boot up this time or not.
If the MacBook still won't turn on or charge after replacing the battery, you are suggested to take it to a nearby repair center to have a careful check. Your machine probably has other hardware issues.
By the way, when your Mac has problems in daily life, don't disassemble and assemble the computer yourself. Your wrong operations will easily make your MacBook Pro A1708 won't turn on and lose files stored on it.