I've been using the white factory cable until recently when the wire insulation cracked around the plug ends, exposing the wiring inside. Got a cheap replacement with a 90 degree angled plug off some site .. lol idk where. It was only $5. Aside of the cord being thin, it works just fine with the stock charger. Im using it right now, charging while in use and it's gaining charge. And believe me, im familiar with the random super slow charging issues. Usually because of Samsungs proprietary USB pin not making a good connection (and this is also why Samsung chargers don't charge fast on non Samsung devices. Those other devices are missing that extra pin that tells the charger to switch to high output mode. The same is true for some USB cords)
Here's another thing. The old white cord still works aside of the damage. I got out the charger for my HTC Rezound and plugged the old usb cord into that..... and it certainly does charge the S4. It didn't seem slow. Maybe it is a (little bit) slower but I didnt notice. I still used internet while charging. The Rezound charger put out something around 1.2A while the Samsung is rated at 2.0A. I'm sure the charging speed would have slowed a lot had I been playing a graphic intensive game or in a full screen video call. Just curious... what Android version are you running (Jellybean, Kitkat, Lollipop)? I am currently rooted on Jellybean 4.3. I wonder if that is affecting it. I do find it odd that Samsung branded chargers are not charging. Are they official Samsung... not Chinese knock-offs? Did you buy in the store or off a website?