Mostly its battery issue as you said you have changed it in the past. If the issue still remain after replacing the battery, the next step is to try a charging port. If this wont fix the issue then its logic board issue (Charging IC). I hope this helps
After you clean the rear mic mesh and still has bad sound then the next step is to clean the rear mic. If the problem still exist then the next step is to change the power flex. It should fix the issue unless it is logic board issue. I hope this helps.