iPhone 7 can't hear phone calls or record voice memos or videos
My iPhone 7 (11.2.6, 32GB) was working fine (no water damage, cracks, or big drops) until one day I found it in my pocket turned off and when I held the lock button to turn it back on, the apple symbol came on but proceeded to flash on and off for about an hour before the phone finally started up. After this event, I have been unable to hear anyone on a call and they can not hear me. I also can not use voice memo app or record videos (noticed this on snapchat).
I received assistance on a call with an Apple employee who directed me to wipe my phone and reset it, setting it up as a new phone rather than immediately restoring it from my backup. The phone took about 20 minutes to finally turn back on after reset and once I set it up as a new iPhone, without connecting it to iCloud or my computer backup, the calls still would not work.
I brought it to the Apple Store after this where they cleaned my sound port and ran a system test, everything came back normal. The sound test they attempted did not work because my phone did not recognize the sound port/the port did not recognize my phone. We tried to erase my iPhone one more time in-store and once it was off, it was taking so long to restart the store actually closed (still the flashing apple sign was visible). 12 hours later my phone finally turned on and I could actually make a call and hear the other person, they could hear me too. But as soon as I signed into my iCloud and got all of my information back on my phone, the calls stopped working. Now, I am able to make a call using bluetooth headphones only, not regular earphones. I am confused why signing into iCloud would cause it to not work again and I would like to fix this issue.
iPhone 7, iOS 11.2.6, null