Coco powder goes in at last 5 min of boil. 4 to 6 oz (dry weight not liquid volume) it is preference.
I have never flavored anything with coffee although it sounds delicious I'm afraid of the caffeine and I usually drink beer with dinner not breakfast.
I do know about brewing coffee.
To brew coffee you can either boil it, Steep it in room temperature water. Also you could probably add a strong batch of coffee to taste in your bottling bucket. Some one with more experience will probably come on and school both of us here.
I added 8oz of freshly made espresso to my porter after the boil was done and in the cool down. I would think you can add it at any stage but keep in mind, when you heat up coffee it brings out the acidity in the bean so if you don't want an acidic coffee do a cold brew and add after the wort is cooled down or during secondary.
If you cold brew, use a lot, like 8oz of beans or more. I made a 1/2 batch (2.5gals) and used 2 oz beans, equivalent to 4 oz in a full batch, and couldn't taste anything.