Most of the answers were only saying "Darwin
didn't even know about DNA." Nevertheless,
Darwinism /is/ about DNA - nowadays, anyway.
I don't know how sperm are (apparently) made
for different roles, and I'm not sure that
anyone does, but it doesn't appear that the
brain has much to do with it. After all,
sperm are made quite a long time before
they are used. However, evolution can
be expected to take advantage of any
opportunity to improve individual success,
and I could believe that committing
adultery releases brain chemicals - the
hormones of lust and fear of being caught -
that are received by sperm as last-minute
instructions to change some of their roles.
But me describing it isn't science, it is
making it up.
I Googled for"sperm" and "different roles"
and got various results, from unauthenticated
sources. One in written in 2006 refers to
"kamikaze sperm". One in 2011 uses the words
"might be" and "kamikaze sperm hypothesis".
This is how people write when they don't know.
So you may as well stop asking - but, if you
still want to know the answer, then look for
a way to help with scientific research.