I would never think of criminals being used in any of the technical sides of warfare. I do think that National Service should be reintroduced, the many people who did it found no quarrels with serving abroad [ a lot did ] and from what I've heard they were professional. Of course a person who wants to be there is going to be a better soldier than someone who is forced, but you then do have the hope of national pride (which did exist) that aided those in National Service to be good soldiers for their nation.
On the case of prisoners; Jail or Military? Jail. The military is a professional force; the only place I would see National Service personell serving is in the infantry, armour, artillery sectors... leave the flying, intelligence gathering, comms to the professionals. I'm certainly not saying that any old idiot can drive a tank, or shoot a rifle in a professional and effective manner - but training an infantryman is a lot easier than training a pilot.
In the ideal world I could say that the money used to supply benefits to those undeserving wasters could be used to fund the National Service program. But it would be another failure of government and I would be naive to expect anything other than more gold in the politicians pockets.