I too have the Samsung Galaxy Tab S 10.5 battery predicament.
Yesterday it was was indicating charging but it drained and eventually switched itself off.
I charged it overnight, switched it on this morning, 100%. However it has now dropped to 78% despite once again showing it 's charging! It is very frustrating. I have had many problems with charging ports over the years, it can get expensive. I overcame the problem on my Nexus 5 LG phone by buying a wireless charger. (Google Wireless Charger £9.99 Amazon Prime, sold by ED Express). This was a fabulous buy. I will try another brand new cord for my Galaxy. Watch this space!