Haven't used cocoa or chocolate. Did two coffee stouts though. Both extract brews.
I hot brewed the coffee for both in the normal fashion, like I was going to drink it, in a regular coffee pot.
The first time, I put it in the boil in place of that much water. This was done near the end of boil. It came out pretty okay.
The second time, I cooled it and added it to the secondary. I got more coffee flavor that way.
You may think boiling coffee would come out nasty, but it's one pot into 4+ gallons water.
I should say, I do like strong coffee. Community New Orleans blend is my fave, followed by Cafe du Monde. Coffee and chicory
Here's a link with three more links in it for you.