There are any number of 9mm service pistols designed and selected in exhaustive processes to ensure that they would continue to function reliably for many thousands of rounds under adverse conditions... if provided with correctly functioning ammunition and magazines.
That last part is the one that'll get ya.
Given "good" ammo and mags, a good service pistol will keep functioning reliably until it gets too dirty to function. If you keep it clean and lubed, it will keep functioning reliably until... probably a spring wears out. If you keep it clean and replace the springs in a timely manner, it will function reliably until a part breaks or some of the parts are so worn that they're no longer in spec to function correctly.
So, IMHO, if you're an average person, you can pick any handgun that has been widely accepted by police and military organizations. If you keep it clean and lubed, use good ammo and magazines, and replace springs on an appropriate schedule, you will never wear that thing out to the point that it won't function properly. Most people just don't put that many thousands of rounds through a handgun in their lifetimes.
Service pistols like Glocks, Smith and Wesson, SIg, Beretta, Walther, FN, etc. will keep functioning reliably as long as you give them what they need.
What do they need?
ammo in spec with regard to size, bullet, propellant, etc.
good mag
clean and lubed
good springs
suitable platform to shoot from (held firmly, barrel not pressed against something, etc)
Maybe I forgot some things. Anyway, there are a bazillion service pistols that will run forever if you give them everything on the list.
If so, the OP's question boils down to which pistol or pistols are the most tolerant of things like out of spec ammo, worn or dented mags, lack of cleaning, worn springs, limp wristing, etc.
I don't claim to have any answers. FWIW, my Makarov has never malfunctioned in the 30+ years I've owned it.