This happened to me only once since I bought a Switch 7 or 8 years ago, so luckily this isn't too common. Several people have different solutions for this problem, and
Nintendo's official solution seems to be a very lengthy process. What worked for me was this:
Wait until the Switch turns off because it says the battery is too low.
Wake it up again, until it turns off again. Repeat until it won't wake up again.
Now boot into Hekate, and wait there until the screen turns off because of low power. When this happens, press the power button to see what happens. If no reaction, or just a blinking red "Low battery" icon appears, you should be good. I would wait another half hour or so, then just plug the power adapter brick directly (without using the dock) and let it charge. I remember the screen turned on with a very high brightness just displaying the battery icon. That lasted for about ten minutes, then the screen turned off. I let it charge for a full 3 or 4 hours, then the battery was ok and the percentages were back to normal.
Your mileage may vary, but I hope this helps.