I had to replace the drain pipe on my garbage disposal because of a hole in the pipe. When attempting to replace it I am unable to get a good seal at the outlet because corrosion has damaged it. Is there any tricks that can be used to improve the seal here to better prevent leakage?
Most sink drain parts are made of polypropylene plastic. It turns out that there's not much that sticks to PP so an adhesive based seal is a big ask. A gasket or o-ring of some sort will be needed. Those require clean, smooth, and flat surfaces, so let's start there.
The gunk looks like it might be a combination of rust, mineral scale, and semi-dried food slime. Some combination of mechanical and chemical work might clean things up. Maybe manual scraping or sanding, or soaking with an acid like vinegar. A rotary tool ("Dremel") with a wire brush or sanding attachment might speed the work.
If you can get it clean then you've got to find a sealing element. A big fat o-ring might do the trick if the flange on the outlet pipe is wide enough, or maybe a replacement outlet pipe will include a new gasket. You could even try using RTV silicone -- but note that silicone won't actually stick to the PP plastic. It might work to apply the silicone to the disposer outlet port, assemble the parts loosely, wait for the silicone to cure, and then tighten the parts so that there's mechanical pressure holding the PP drain tube to the silicone.
To be clear -- based on its apparent condition, most people would replace that disposer. But if you're up for a challenge and the time-vs-money balance makes sense, maybe these ideas will be some help.