There's something no one has covered yet. Let's assume full theoretical perfectness, the two objects really are completely symmetric in how they approach each other. In the case of a car, this even means that one car will have the driver's seat on the right side and one will have it on the left.
Crashing into a wall has one component that the train-on-train collision does not - coefficient of friction. Take the direction of movement to be the x-axis for one of the trains, which is perpendicular to the yz-plane of collision. Nothing crosses the yz-plane. If there was shrapnel from one train, it would collide perfectly with the identical shrapnel from the other plane (suspending disbelief for a moment). Something is still different, which is the dampening in the yz directions. In both cases of a strong wall and a train-on-train collision, there is highly inelastic physics in the x-direction, however, in the case of train-on-train, there is no energy dissipation in the yz-plane whatsoever.
Imagine that I throw a tennis ball into the air in the general direction of a perfect mirror clone of myself. The ball bounces off the ball that my mirror image throws. The ball gains no rotational momentum whatsoever. It bounces back toward me off the imaginary yz-plane discussed above. If I threw the same ball at a wall, it would:
- slow down more
- gain rotational momentum
- land closer to the center of the system
For the case of a train wreck these factors probably aren't a huge deal, but for an entirely physics-based discussion, the zy-plane coefficient of friction is the one factor that separates the perfectly ideal situations.