Not only that but iPhones are generally more durable now than when they first launched in 2007 allowing Apple to justify their need to raise prices.
A more durable phone reduces the incentive to upgrade to a newer device every 18-24 months like was the case with iPhones from 10 years ago — like the iPhone 3GS — it offered a compelling reason to upgrade because it was released with much faster hardware specs than the iPhone 3G before it.
The pace of hardware improvements: 2G -> 3G -> 4G cellular speeds; camera pixel count increases; faster processors etc, has reduced considerably.