In my experience, iPhone 4 was better than iPhone 8 which is better than iPhone 17. Either I got lucky, went to more interesting places and composed better, or the technology is getting worse from an aesthetic point-of-view. I definitely had more keepers, more memorable photos of a higher subjective quality. I pretty much don't bother with iPhotography now.
Similar story on Android but I won't bore with the model names and numbers. Older handsets gave better results. Pre-smartphone, king of the hill was the Sony K800, I loved the photos from that phone. No fancy software, just quality hardware and straightforward processing gave consistent results.
That said, I should try Halide app. Bringing it back to basics with less computation might be the way forward for me.
Might your impression of these pictures be colored by your life experience during that time, ie. you might have been in your early twenties with the iPhone 4, and those pictures carried the smell of that time in your life.
That's entirely possible and quite likely. The only way to find out would be to renovate the battery and take it out to go shoot stuff. I'm not sure I'm that invested to make the effort especially as the rest of the handset is basically useless at this point.