Remove any loose gunk from the pipe. Hold the pipe upside down and gently tap to remove any remaining particles. Then use a pipe cleaner, cotton swab, mechanical pencil, needle, or similarly thin object to remove any large, easily dislodged bits of resin you can reach. Don’t risk breaking the pipe to get at tough spots, as you only need to get anything big and easy to reach off now. This will help the alcohol clean the rest of the pipe faster.
Fill a plastic reseal-able bag with isopropyl (rubbing) alcohol. Try and purchase 90% isopropyl, as it will clean the pipe faster than the more watered-down 71% solution. Place the pipe inside, making sure it is fully submerged in the fluid. Alcohol breaks down tar and resin, making it easier to remove and cleaning off stains over time
Add 1 tablespoon of salt to the bag. Salt will act like an abrasive sponge on your pipe, scrubbing away the resin in places you could never reach with a sponge or brush. Because it is meant to rub away the resin, try and use the biggest grains of salt you can find — course or kosher salt is usually your best bet.