I don't trim pistol brass.
As to 9mm Luger, I do sort by headstamp, just like all other calibers I load. I don't crimp 9mm because they headspace off the case mouth mostly. If I ever had some 9mm brass that wouldn't chamber due to brass being too long, I'd just cull them. Now is as good of a time to mention, I cull certain 9mm headstamps when sorting them: AMERC, S&B, ARMSCOR, A USA, all the NT flavors as they have larger flash hole, and any with the internal ledge. Those may be successfully loaded, a certain percentage anyway, but I find they give me more problems than the other brands.
Speaking of cases and trimming of other calibers ...Once, I ran across some 41 mag cases that were too long to crimp properly, I believe they were WW Super. So I ordered a Lee case gauge (for trimming), but decided to not trim them, and save them for use in a loading shot experiment, which will probably never happen, LOL.