I am having thr exact same issue. Microphone works fine in the sound recorder app and to trigger google via okay google voice command. It then works to ask google something. Doesn't work for voice to text, I've tried different versions of android sys...
Oh, very interesting regarding it being slightly swollen. Do you charge it for extended periods of time? Glad that they found the fault and were able to rectify it.
Replace the battery and see if that resolves the shutting down issue as it only shuts down when it's on battery. Sounds like a faulty battery controller misreporting to the system.
I've had this phone 2 years and I've never experienced random shut downs. You have to realise that complaints you read about online are from the minority. Most people with good experiences don't comment online.