Can you measure battery voltage at the charging contacts (if it has any that are accessible)? If so then compare full charge voltage to the voltage at the point of shutdown. It might just be a dying battery. How old is it?
If you have no external measurement points then you have to open it, paying attention to gaskets' positions for waterproofing if present. It may never be waterproof again, some gaskets only work well on first assembly.
Once inside, you can measure power or if a thermal switch trips you can measure closed and open circuit resistance across it. You could also substitute a different battery or disconnect the battery and supply an alternate power source of same voltage. If you don't have an alternate source, consider it is Li-Ion powered, so probably 3.7-ish voltage would work like 3 x AA cells in series could be rigged up to approximate that if nothing else, ideally NiMH since alkalines aren't good for as much current.
Unless it is extremely bogged down (motor seized, not working, and even then...) I doubt a thermal switch after only 5 seconds.
I suppose something super-sophisticated could measure motor RPM and shut it off if it is too low, meaning maybe (probably not, lol) the possibility that it just needs gunk cleaned out.