Electronics tend to fail early in life, or late in life. If the electronics don't fail in the first few months they'll probably last a long time - likely longer than you'll want to keep the phone. Of course, as you mentioned, that doesn't apply to the mechanical parts like switches and jacks, and it doesn't apply to a phone that gets abused. I have a business client (owner, construction) who uses his iPhone constantly throughout the day. About 6 months ago he upgraded his 4 to a 5 because he had wore out the Sleep/Wake button (sometimes it would work, sometimes not), turning the phone off so many times a day. He was at the end of his 2 year contract with Verizon and limped along for the last couple of months until he was eligible to upgrade. So, I guess I'm saying that if he got 2 years out of it a "less aggressive" user should certainly expect considerably more than that with no problem.
I personally used my iPhone 4 for 3 1/2 years until about a month ago when I upgraded to a 5s. The mechanical stuff was still working perfectly. I upgraded because of sluggish response running iOS 7. At the rate that changes take place in iOS and the technology in general, I'd bet that you'll be about ready for a new phone on general principles in 3 or 4 years anyway.
BTW, for anyone who wonders why the business owner didn't just let the phone shut itself off on a one-minute auto-shutdown, I'm pretty sure that he was trying to save battery. I know that battery life during a day's use was an issue for him. He often didn't have time to give it a charge during the day.