Are you talking about that charging port flex with the microphone and home button connection? Or are you talking about the charging cable you need to plug it into the charger port at a certain angle.
If it's the second you can try cleaning the charger port with an tooth pick or something equivilant. And try plugging it in and see if it works fine.
If not then you need to replace the charging dock assembly.
I test them by just plugging them in and plugging the charger in and testing microphone. Flex of the cable shouldn't cause it to go bad unless it's already damaged physically is already broken inside.