If you believe in evolution, than you know that the foreskin's primary function is protection of the penis and to facilitate easier penetration for fast sex in primitive times (didn't have a lot of time to stroke it when wild animals and other guys might be trying to kill you, especially if you weren't a dominant male).
It didn't develop as a pleasure mechanism, that's incidental because it's on the tip of the penis, where nerve response is centered so our more instinctual ancestors had desire to stick it in a warm wet place. Its role in male pleasure is certainly not primary, and probably little or at all for women. Procreation, in evolutionary terms, was all about making it work, not feel great. Instinct takes care of all that.
I think you are both a little bit right and a little bit wrong about this. Pleasure, of course, would be just as important as functionality, in that the caveman who enjoyed sex more would be more likely to fuck, and thus procreate. Natural selection would favor the caveman who was more of a horndog and loved fucking and did it every chance he got. Also, we were social creatures who lived in groups, and protected one another. As such, I don't think sex was quite as hazardous as you might believe. Not so run and gun as much as a social bonding thing.