They are entirely different sensors, and share nothing at all in common. To start, the Nexus 5 has a 1/3.2" sensor, while the 5s has a 1/3.0" sensor (making evident from the start that in no universe are they "bordering on identical"). The iPhone has a f2.2 lens assembly. The Nexus has a f2.5 lens assembly. Empirically in both of those cases the iPhone has the superior option, not even getting into the specifics of tiering and segmentation.
The Nexus 5 has a camera sensor equivalent with the iPhone 5, on paper, but is handily and easily beaten by the 5s, and it shows.