How do I prevent losing contrast when compositing semi-transparent images?
You can get a better result by using the Mix node's Multiply blend mode instead of the Alpha Over node.



Here's the node setup (you first need to create a unified mask to use as a factor for the mix node):