For chocolate sponge cake, grease and lightly flour a 15x10x1-inch baking pan. Set aside. Stir together flour, the 1/4 cup cocoa powder, and baking soda in a small bowl; set aside.
Beat 4 egg yolks and vanilla in a medium mixing bowl with an electric mixer on high speed for 5 minutes or until thick and lemon-colored. Gradually add the 1/3 cup sugar, beating on high speed until sugar is almost dissolved.
Wash beaters thoroughly. Beat egg whites in a large mixing bowl with an electric mixer on medium speed until soft peaks form (tips curl). Gradually add the 1/2 cup sugar, beating until stiff peaks form (tips stand straight). Fold egg yolk mixture into beaten egg whites. Sprinkle flour mixture over egg mixture; fold in gently just until combined. Spread batter evenly in the prepared pan.
Bake in a 375 degree F oven for 15 to 18 minutes or until cake springs back when lightly touched. Immediately loosen edges of cake from pan and turn cake out onto a wire rack. Cool completely.
For custard, combine 4 egg yolks; milk, half-and-half, or light cream; and the 1/4 cup sugar in a heavy medium saucepan. Cook and stir over medium heat until mixture just coats a metal spoon. Remove pan from heat; stir in the 1 to 2 tablespoons amaretto or creme de cacao. Quickly cool by placing the saucepan in a pan of ice water for 1 to 2 minutes, stirring constantly. Pour custard mixture into a bowl. Cover the surface with plastic wrap. Chill for 1 to 4 hours.
To assemble trifle, spread raspberry jam over top of chocolate sponge cake. Cut cake into 18 rectangles. Arrange half of the rectangles, preserves side up, on bottom of a 2-1/2-quart glass bowl. Sprinkle with 2 tablespoons of the remaining amaretto or creme de cacao. Sprinkle with half of the raspberries and half of the almonds. Spread half of the custard over all. Sprinkle with half of the chopped chocolate. Repeat layers. Cover and chill for 3 to 8 hours.
Beat whipping cream until stiff peaks form (peaks stand straight). Dollop onto trifle. Sift cocoa powder over top of trifle. Makes 12 to 14 servings.