What I don't understand about Napoleonic warfare is why entrenchments were not more common on the battlefield.
I can think of some few things. First, you need time to dig yourself down, like a day. Second you're quite stuck in that position, so the enemy can simply move around you. Third, this I don't know but at the Napoleonic age perhaps a disrespect for trench warfare was in place?
And the Forth point, the biggest one. Are you going to attack an entrenched enemy? Atleast during the 30-years war, a good way to avoid a battle was to dig yourself down.

That's why there was so few trenches in the big battles, when the enemy was digged down, you didn't attack him, but tried to flank him or tried to cut of his supplies.

Ultimately I think the reasons for prefering volleys to closing to hand to hand must be psychological?
Mostly yes, but that volley is going to take the edge of the attack due to problems passing the bodies. Still, the Caroliners (Karl XII troops) was trained for attack and to be completly silent to get extra morale decrease for the enemy. Taking a charge was always morale decreasing.

Wait I almost forgot one important thing. Cannons. In close range the accuracy increased and they changed ammonition to shotgun type (I'm not sure of the name in English). This is probably a big reason not to go into melee.