Step 1Smash each olive with flat side of knife or kitchen mallet to facilitate removal of pit. To eliminate strong salt flavor from olives, soak pieces in cold water for rest of preparation time, changing water 3 times.
Step 2Peel eggplant. Cut in half lengthwise, then cut each half into 1/2-inch slices lengthwise. Cut lengths into 1/2-inch pieces.
Step 3Place oil and celery in large, heavy-bottomed pot. Saute over medium heat until celery is translucent but not browned, about 5 minutes. Add eggplant. Coat it with oil and cook, stirring so it doesn't burn or stick, about 5 minutes.
Step 4Drain olives and add them to pot, mixing well. Stir in raisins. Season to taste with salt and pepper. Cover and cook at low heat until eggplant is quite soft, almost a chunky paste, 40 to 60 minutes. Stir from time to time.
Step 1Place tomatoes in bowl and squeeze them into a puree with your hands. Place olive oil and garlic into small, heavy saucepan over medium heat. When garlic turns golden on all sides, 2 to 3 minutes, discard it.
Step 2Stir tomatoes into oil until well-blended and "creamy." Season with salt, then add sugar, basil and several grindings of pepper. Reduce heat and simmer until sauce has thickened a bit, about 10 minutes. If sauce is ready before eggplant, turn off heat and leave it on stove until needed.
Step 1When eggplant is ready, remove lid, turn up heat and boil away liquid that separates when mixture is pushed aside with wooden spoon.
Step 2Reduce heat, add Tomato Sauce and cook uncovered until capunatina thickens slightly, about 10 minutes.
Step 3Remove pot from heat, add vinegar and red pepper flakes. Turn capunatina into serving bowl. Stir in cocoa powder and almonds.
Step 4While it cools, stir from time to time. When it reaches room temperature, about 1 hour, cover with plastic wrap and refrigerate until slightly chilled, about 30 minutes. If capunatina has been made in advance, let come to room temperature 1 hour before serving.