After some research, here is the answer: If the serial number is known, then
http://sndeep.info/en can be used to look-up the manufacture date. From there, research the iOS release dates to take a highly educated guess regarding what iOS shipped on the phone. For example, if the manufacture date was the year 2012 and its current age is 7 years and 2 months, then we can surmise that the iPhone 4s shipped with iOS 6, because today is 12/24/2019 and iOS 6 was released on September 19, 2012. [The above-mentioned website even shows the week of manufacture; i.e., week #40.]