DIAGNOSIS That's a mix of sawdust, carbon dust from the motor brushes (even brushless models have some), and general job site grime. It's insulating components and blocking cooling vents, which can lead to overheating.
FIX You need compressed air. First, remove the battery. Use the air nozzle to blow into every vent—especially the large ones near the trigger and on the top of the motor housing. Blow from different angles. Then, open the battery port and blow in there to clear the terminal area. For the sticky gunk inside the handle grooves, use a soft-bristled brush (an old toothbrush works) dipped in a little isopropyl alcohol to scrub it loose, then blow or wipe it away.
IF THAT DIDN'T WORK If the gunk is hardened like resin, you might need to partially disassemble the tool. Removing the two screws under the rubber grip on the handle will let you open just that section for more direct cleaning without a full teardown.
HEADS UP Never use water or a wet rag, and avoid household cleaners. The alcohol is okay because it evaporates quickly. Moisture left inside can corrode the electrical contacts and the battery terminals.