Unfortunately, the answer to this question is not there, as long as it is performing up to your requirement.
Performance measures
There is no such measure to guess the average lifetime of an iPhone, as a matter of fact for any phone. We consider some performance measures to guess it.
Lifetime Assessment model
Apple uses a lifetime assessment model to estimate how long a user keeps their iPhone, the criteria do not include if the phone is broken.
Average lifetime of iPhone
Based on these criteria, Apple assumes that an average iPhone user keeps the phone for about three years or more.
Info from the iPhone trade-ins
Based on these criteria, Apple assumes that an average iPhone user keeps the phone for about three years or more.
Performance of the iPhones
We can also predict the average lifespan based on the performance of the iPhones, this also includes different criteria to decide.
Common performance measures
In iPhone, the three most common performance-related measures are battery life, storage, and abrupt functioning of the software.
Conclusion
To conclude, as long as it's performing to your satisfaction, there is no harm in holding on to the same iPhone.