I'm skeptical that it's your USB cable. Have you tried any other cable? Any USB 3.0 cable should work. I have several that came with USB 3.0 hard drive enclosures I've purchased over the years, and they ALL work with my N5 DAP. Wiggling a cable that's plugged into a USB port, on a 'device', to make it work (charge a battery or provide a signal path) is called an 'intermittent electrical connection', which, more often than not, indicates a cold solder joint in either the wiring from the port to whatever is connected to it, or at the connector itself; where it's soldered to the printed circuit (PC) board it's mounted to.
Either is a pretty simple 'fix', IF you're at all skilled with a soldering iron. If you're not, there are dozens of YouTube videos that will provide guidance. If there's a local repair shop where you live, ask if they have any scrap boards laying around that you can practice on. Or, go to any second-hand shop (Goodwill or whatever) and buy the cheapest 'thing' you can find that's got a PC board in it. Practice makes perfect and if you're determined, there are VERY few things you can't fix yourself.