DO NOT DO FACTORY RESET, just wipe cache partitions.
Turn off the device.
Press and hold the following three buttons at the same time: Volume Up key, Home key, and Power key.
When the phone vibrates, release the Power key but continue to press and hold the Volume Up key and the Home key.
When the Android System Recovery screen appears, release the Volume Up and Home keys.
Press the Volume Down key to highlight wipe cache partition.
Press the Power key to select.
When the wipe cache partition is complete, Reboot system now is highlighted.
Press the Power key to restart the device.
Thanks to https://thedroidguy.com/2017/01/solutions-for-galaxy-s5-battery-drain-issue-1049822