Prepare brownie mix according to package directions for a 9x13-inch pan. Cool completely, then cut into 1-inch cubes.
In a large bowl, whisk together pudding mix and milk until thickened, about 2 minutes. Fold in 8 oz whipped topping and sour cream until smooth.
In another bowl, combine sweetened condensed milk and 12 oz whipped topping; mix gently.
Layer half of the brownie cubes in the bottom of a trifle dish or large glass bowl. Drizzle with half of the chocolate syrup. Spread half of the pudding mixture over brownies. Spread half of the sweetened condensed milk mixture over pudding. Repeat layers: remaining brownies, chocolate syrup, pudding mixture, and sweetened condensed milk mixture.
Top with remaining whipped topping (if any) and garnish with chopped pecans and chocolate shavings if desired. Refrigerate for at least 2 hours before serving.
Tips
Can be made a day ahead; cover and refrigerate.
Use homemade brownies for a richer flavor.
Substitute butterscotch or white chocolate pudding for variation.