Note that I have a couple books on trim and I never have read them, so this is all just my experiments based on previous similar life experience and taking a shot at it. I think it works very well, but then again I could be missing something that would make the process easier or better. That said. . .
I used an industrial cleaner from a restaurant supply, but it's still potassium hydroxide (similar to sodium hydroxide "lye"). I split 33 gallon garbage bags to make long plastic sheets (I didn't have a roll of Visqueen or $1 plastic painter's tarps at first). The trim was laid on the plastic, sprayed or brushed with cleaner, and the plastic folded over so the cleaner wouldn't dry too fast. After 10 minutes, I started pulling teh plastic back a bit at a time to scrub the trim with generic brand red Scotchbrite. You can tell if it's cutting through and if not, just spray a bit more and cover it again to repeat.
Once it's all evenly scrubbed, it's out to the driveway to blast it with the hose. The next light pass is with fine Wet-or-Dry sandpaper on little rubber blocks (or abrasive-coated foam sanding blocks from the hardware) that will expose high and low areas that need attention before moving on. Be careful of over-doing peaks, corners and edges anywhere in the process. Then finer grades of pads, followed by ultrafine wet-or-dry sandpaper on the small rubber blocks. I try to keep the trim on the floor or table the whole time to avoid handling and bending when applying pressure, but the very edges must be done while holding. Fortunately, the edges are easy and lightly push sideways on it so bending is not nearly so likely.
I've used buffing machines before - but not enough to really get skilled - and I don't trust myself to avoid bending or catching an edge and twisting the trim to a pretzel while cutting my fingers off. So, I use an electric die grinder with a home-made variable speed box using a dimmer switch. It's basically a giant Dremel tool. 4 and 6-inch buffing wheels and a box of compound sticks does the rest in stages. I do not recommend a Dremel as it will be too slow, but especially as it will not be large enough contact area to give an even polish without distortion and waves.
Again, I try to keep it flat on the table and run the wheels down it with fairly low speed and
light pressure with each pass at a cross-angle. Final passes are lengthwise. I held trim down with foam blocks and Qwik-Clamps. Yes, I needed a second set of hands a few times so I could control the wheel with two hands. Most important tip - smooth even passes like spray painting. Do NOT work areas or spots or you will get uneven distortions you won't see until the final polish. I wash and degrease very thoroughly (especially the back and edges) and shoot the sealer.
Removal of the anodizing can be done several ways, and I have done small pieces using the electrolysis method and just a little lye that worked very well, and also alkaline cleaners like Greased Lightning (spray, scrub, spray, scrub). Try a couple alkaline substances to find what technique works well for you. Be patient and do not skip doing each finer grade thoroughly, or the scratches will take twice as long to get out later. Use everything lightly. Relax and enjoy.
David
PS: if your trim not damaged at all, and is just dull or mottled, then you should try to start with finer grades of abrasives. No sense in making it rough just to polish it back out.