I love that you are looking at different meanings - each time we unveil another layer we come closer to the inner meaning, or the sacred meaning.
For example although the "severed head" seems violent, it has other meanings. The "severed head" can be found in the stories of Medusa, John the Baptist, in the Popol Vuh (Mayan Poem of Creation), and there appears to be a reference in the Quran to David and Goliath.
The connnection of earth and heaven is symbolized in the human body with the head representing the heavens. When man cuts off his connection to this whole system of energy, he in effect cuts off the head from the body. It has to be reconnected for us to remember who we really are. Everything is in the symbols - there is a reason for the 40 years, a reason for the number of stones (some stories are 5 and one is 7 and one even claims that the stones fuse into one that fatally strikes Goliath in the forehead - the location of the third eye).
In one version Goliath is the son of Orpah (sister of Ruth). She gave birth to four giants. Goliath was the strongest. And because she walked forty steps with Naomi before turning back to Moab, Goliath was permitted to show off his great strength and skill to the Israelites for forty days before being killed by David.
Another possibility is that the story stresses confidence for upcoming battles - and the battle may not be external but internal. In reality there are no right or wrong answers, just the search for truth. Thanks Wil for sharing your thoughts.
He Hawai'i Au, poh