Could you add anymore info about what is going on? Does it happen when the battery is low? Have you calibrated the battery by letting it run down to 1% then charging it up to 100% without using it while charging? Do that, and after you reach 100%, let it continue to charge another hour. It sounds like the battery is shutting the phone down at too high a %. A restore should have fixed it. Did you restore from a back up or as new? You may need to restore as a new phone. You would need to put all those photos and videos somewhere first. Apps like Box, Dropbox and OneDrive are great for storing photos and videos. Back up your contacts in Google contacts or somewhere. Good luck!
Sent from my ancient but trustworthy iPhone 5