Cord did look a little worn. I guessing based on your feedback that cord is likely the culprit, and a $12 cord is worth trying?
I'd fire it up and manipulate the cord in that area. Pinch/twist/pull/rotate a bit. See if it runs steady or if it cuts in and out.
Switches, cords, and brushes, they're often the most common thing to fail. I have a couple of near-new Bosch routers I got for free. Replaced the switches and they were good to go. My dewalt chop saw, I've had that (I think it's a 715?) for over 25 years. I've replaced the switch and the brushes on that. Replaced brushes on a few routers. Got a few angle grinders at auction, two ran like ****. Brushes were way past their prime, short carbon, chipped edges. Replaced for a couple dollars and they're back to grinding metal. You can always pull the brushes and give them a look-see. A bad brush will be apparent.
Good luck!