Take a look at our article about charging problems (https://appletoolbox.com/2016/12/iphone-not-charging-lightning-port-problems-fix/)
There are ways to fix this problem. If none of the steps help, it probably is a hardware problem. However, this is still usually fixable. Since the Apple Store said they couldn’t fix it, take it into another third-party repair center and see what they think.
Best of Luck!