Is it possible?
I would suggest making a giant squad for al of your civilians, and stationing them i the warrens. you could even give them some weapons just in case.
I think something along the lines of the zoning tool would solve this best. Just select an area outdoors and tell it to treat that as indoors for purposes of dwarf travel permits or vice versa.
The whole "massive recruit militia of scared children hiding in the dinning room" is self crippling. The ability to just say "don't go past point X" would allow underground work to continue. In the end it would balance out play-wise since by not having them drafted into one giant militia there is the increased danger of exposure to battle, but with the zoning you'd be able to control the degree of danger.