I could pretty much guarantee that peak Prost or Mansell would comfortably eclipse peak Kovalainen were it possible to bring them together. This is purely about the currency of lap time. Any given time difference between team-mates has entirely different weightings according to the circumstances. How would you even begin trying to encapsulate that into an algorithm? Now, let’s consider driver weights. It’s only since 1995 that the minimum weight included the driver weight. Up until that time, it referred to the car only. So if you were heavier than the lightest guy, that was raw lap time you were giving away to him. Take the case of Prost and Mansell paired together at Ferrari in 1990. Their average qualifying lap over that season was almost identical to the hundredth of a second. But Prost weighed in at 59kg, Mansell at 78kg. A difference of 18kg would be worth around 0.54sec. That’s how much Mansell was giving away to Prost just by his physical size. He’d need to drive the equivalent of 0.54s better just to get to the same lap time. Do you include that in the algorithm? On the other hand, Mansell’s greater upper body strength was probably worth lap time through the fast corners in the days before power steering. But how much? As much as 0.54sec? Probably not, but how much less? Later team-mate comparisons would not be skewed by these factors. So how can they be compared through the eras?
There is almost an infinity of other factors that raw statistics cannot take into account in something so complex as F1, especially through the eras. If we had perfect knowledge of every one of those variables, then yes, they could be fed into an algorithm. But they can’t and never will be.