After five days of testing with another charger, the problem is solved. I never would have thought a faulty charger could be responsible for such a sporadic yet consistent issue. Glad that's over with.
Original Post (just for fun):
Searching turned up a lot of other people with the issue of slow charging, but no one has given very much detail. I'm going to try to provide as much documentation as I can of this problem.
What is the "slow charging"?:
Usually the One charges from 0 to 100 in about 2 hours. But sometimes for me it goes all night without finishing. I wake up in the morning to the dismay of still seeing the orange light instead of green. ~60% charge over 8 hours.
My HTC One M7 is a bit less than a year old.
The charging cable I use is the one that came with the phone.
I've dropped my phone plenty of times.
Sometimes I try to plug the phone in in the dark, and I kind of jam it in at an awkward angle. Probably bad for the microUSB head.
ROM: ARHD 71.1
Kernel: ElementalX 14.2
Recovery: TWRP 22.214.171.124 with Holofied theme (awesome theme try it out haha)
Other stuff: Project ERA 19.1 soundmod, and ViPER4Android installed.
I had my first case of slow charging around May, and I thought it was just a fluke because I only slept about three hours that night. Then it occurred again in July, and then it came more and more frequently, which seems kind of weird. It now occurs pretty much every other day. It's like it can smell my anxiety.
Self-Explanatory Battery Graphs (notice how the slow charge charges at about the rate battery was drained the day before, while normal charging is more than twice that slope (twice the rate)):
Because of the amount of times it's happened, I've run tests.
I clear all the open apps before going to bed, but the remaining "running" apps include ViPER, Dropbox, Google Play services, Greenify, Sense Input.
If I pull it out and then plug it back in, slow charging goes back to normal charging (result of one test).