Serious Iphone problem. Need help!

Hello. Recently I purchased an Iphone 5s on the polish counterpart of ebay. Everything worked fine untill now. One day in iphone for no reason lost microphone, headphone out out and a speaker which u use during calls. These 3 things just stopped working for no reason. Next day all these things started to work agin.And again for no reason. This situation repeated today, however these things wont start to work again. My device was running on ios 9.1 beta. I decided to downgrade it to 9.0.2. Unfortunately the problem remained. Does anyone know what might be the reason of these issues? Forgive me my poor language. English isnt my native language.
Welcome to iMore! Honestly, it sounds hardware to me. Hopefully I'm wrong. You could try to run a device recovery and set up as new, then run your phone for a day or two with just stock apps and see if the problem persists.

Original thread: https://forums.imore.com/threads/serious-iphone-problem-need-help.345668/