As you said you need to use .wrapInner()
jQuery(function(){
$('body').wrapInner('<div class="wrap" />')
})
Demo: Fiddle
For your second question: would it be better to create the wrap element dynamically with code (from within the body), or have it be a part of the DOM from the start (from within the body)?
It will always be better if you change the markup than to modify the dom using script later