I imagine that the strength of 3d printed gears is directly tied to the material used. One of the high strength "tough" resins for instance, rather than the fine detail ones.
I used Siraya Tech 'Build' sonic grey on the gears I made. Actually use it on everything. It has great detail, you can drill and tap it, if you don't over-cure it stays somewhat flexible and yet is strong. I ran the loco an hour or so and did what you shouldn't do and put it into forward and reverse at speed to 'shock' the gears. All was good.
How long will they last? Have no idea and probably won't run this engine 3 hours in the rest of my time here. I have spares (costs pennies to print) although I do wonder how much/if resin gets more brittle over time even sitting in a dark container?
There are probably better resins than what I use but for N scale you still need good detail on the gears.
Sumner