When Molly had her puppies my husband made 'pig rails' for her whelping box...which was a large plastic tote with one side cut out so she could come and go but up high enough that the puppies couldn't step out until they were older. Here is a website that has pig rails like the ones we made...they are used so the mother can't rest against the side of the box and possibly smother a pup...it gives the pup room between them and the mother all around the box:
Dog Health — whelping box pig rails