@Hit-N-Miss Tom POM / acetal / delrin is common for cut gears, and I've heard of more people lately printing it, though I've also heard that bed adhesion can be tricky. It's on my list to play with but I haven't ordered any yet. I've heard of and seen ABS for printed change gears, which is fine, but you may want to account for a bit of shrinking. Some of the modified PLAs (like PLA+) are probably a reasonable choice too. ABS typically shrinks more uniformly than PLA; PLA tends to shrink differently in Z than in X/Y but for a gear that's actually not a big deal.
I used PLA+ to print some bevel gears. I used 0.1mm layers for the bevel gears for a smoother bevel, but for spur gears I don't think that's valuable. Thinner layers aren't necessarily stronger. I think that 0.3mm layers with a 0.4mm nozzle is common for spur gears for change gears, if memory serves.
Annealing PLA will cause substantial changes, if I remember right it will typically shrink meaningfully in X and Y and expand in Z. This can be measured and pre-scaled against. I've seen multiple reports of annealed PLA being strong and heat-resistant, neither of which is a characteristic I normally associate with PLA. But I'd think that with PLA+ you would be fine without annealing.
For change gears, they shouldn't be under tremendous load. You typically have a clutch or shear pin to protect steel change gears; with essentially disposable plastic gears they will probably fail before a shear pin but should be fine for driving a lead screw.
OpenSCAD's MCAD collection has an involute gear module.