What is the typical life cycle of mid-range rear derailleurs assuming no accidents? More precisely, what's the average mileage after which it's better to replace it rather than doing tuning all the time?
Derailleurs will last almost indefinitely. The jockey wheels will wear out in time (tens of thousands of km) but the rest of the mechanism shouldn't see significant wear.
My main road bike has campagnolo gran sport derailleurs. That was mid range when I bought it back in 1980. Probably over 100000 miles by now. I have replaced cables and jockey wheels a few times but it still shifts great.
I got 23,000 miles out of my rear derailleur. The sprocket inside the derailleur broke loose and while it still worked it needed replacement. My bike is in the shop and I hope to get it back tomorrow. The first local bike shop just today told me it needed replacement and I took it to a second shop to confirm this. Make sure you find a shop you trust because I was told the derailleur needed replacement three years ago by a shop owner who tried to con me. It DID not need replacement three years ago. If you are unsure of whether to trust your local bike shop take the bike to another shop for a second opinion. I found many shops to be dishonest. (12-12-2018)