As for the etymology of boffin...
Per the Oxford English dictionary, the origin is unknown.
Per other language mavens, looks like the term may have been coined by the British military around WWII.
My bet is that the original usage was pejorative.
Boffin was a poor, uneducated, working man who inherited a fortune, and later gave it away.
However, there is no documented link to the post-WW2 word "boffin."