Those are all signs of a lithium battery at the end of its life. You get these sudden voltage drops going from 30% to just a few %.
The percentage remaining indicator is not absolute science.
They measure the voltage and calculate the percentage for the voltage.
The Switch shuts itself down because if it would suddenly turn of while writing to the SD or internal memory, you might end up with some memory corruption. Especially with exFat formatted SD cards.