Chocolate (and vanilla) originated in Mesoamerica. Both the Mayans and the Aztecs flavored chocolate drinks and other chocolate items with chili peppers (usually ground). I think it goes well together, but the chili shouldn’t be overwhelming. Just a hint of spiciness is good. In that way, it’s similar to ginger.