Adventuring while wearing an iron box isn't all it's cracked up to be
Yes, a creature inside a typical iron box—even if the box has eye slits—has cover. Whether this is total cover or improved cover depends on how big a hole the box has for the eye slits. If there are really tiny eye slits, then it can be argued that the box provides the wearer with total cover, essentially offering its wearer the benefit of a tower shield on each of its 4 sides and its top. However, the necromancer within won't be able to make attacks or cast spells on anyone else or at anything or to anywhere outside the box until he exits the box. Total cover works both ways—if the enemies can't get you then you can't get them.
If the eye slits are more generous—like, says, the equivalent of being 1-ft. in diameter—, then the box grants the wearer only improved cover. On Aiming a Spell on Line of Effect, in part, says, "An otherwise solid barrier with a hole of at least 1 square foot through it does not block a spell's line of effect." This will allow the necromancer to still participate in encounters, verbally command his undead minions (which the GM may rule is impossible from the more severe box), and cast spells… but the necromancer himself can still be the target of attacks and spells, albeit gaining from the box a +8 cover bonus on AC, a +4 cover bonus on Reflex saving throws, and the benefits of the extraordinary ability improved evasion.
With either box, there is the matter of expense (there's no price for a Medium iron box, but this GM would likely have such an item cost the equivalent of 5 tower shields or 150 gp) and, more importantly, weight (again, 5 tower shields so about 225 lbs.). While the box's price is relatively trivial (except at level 1), the box's weight will slow any less-than-Strength 16 necromancer to near immobility while he's within.
There will be no hasty retreat if things go wrong while the necromancer's in that box.
Discuss this plan with the GM and the other players
Pathfinder is usually imagined as a role-playing game of heroic magical adventure. In this regard, your concern for your PC's well-being seems a slight overreaction. While it might be amusing at first, it may soon grate on the GM or the other players to have the party composed of the brave, bare-chested, axe-wielding human barbarian; the devout and sagacious yet still warlike dwarf cleric; the light-fingered, double-dagger-wielding drow rogue; and the necromancer-in-the-box.
That's not to say that adventuring while mostly in an iron box isn't a good idea in the abstract—especially considering the (frequently short and often horrible) life that's led by the typical Pathfinder adventurer—, but, on a metagame level, having a PC who so highly values his own life that he's unwilling to risk himself or his resources on behalf of his friends in combat (that is, while the PC benefits from total cover) will violate many folks' expectations, and, perhaps, even anger some of the other players. They could turn against you… or turn it up to 11: The game could become the story of four iron-box-wearing PCs who, upon encountering foes, turtle up and wait for the foes to get bored and leave. Needless to say, that's a little odd for a game of heroic magical adventure.1,2
Anyway, talk with the GM and the other players about their expectations for the campaign before committing your PC to this course.
1 I can't help but be reminded of this question.
2 This player has long imagined a group of PCs who all possess the ability to feign death and who, upon seeing foes, collectively fake heart attacks. The PCs would be by those foes looted but unharmed, they believing the PCs already deceased. The PCs would be treasure poor yet experience rich, having survived harrowing encounters with all sorts of monsters by, essentially, doing nothing. Unfortunately, this imaginary group suffers a TPK upon encountering a monster that sees dead adventurers not as postmortem treasure troves but as meals.