I used an HTC M7 since it was released, never an issue of this kind.
Get the M10, which is overall great. It updated a few days ago to new firmware. But the following issues stand out:
Bose SoundTrue headphones: Only work if I plug them in part way (all but the last 1 mm). If I plug them in all the way, I hear nothing.
Skullcandy earbuds: Often have to re insert jack 1 or 2 times to get the mic to work.
Great phone.... but how to solve?