Do you run g-code on your machine? If so, this could be achieved using a spreadsheet with some setup time and provided you are familiar with the required g-codes.
1. Make individual programs for each digit separately 0 -> 9
2. Make a blank program just for the outside profile
3. Add some bits of code for each digit position which would vary depending on your machine, something like:
ABSOLUTE
NEW WORK OFFSET x y
PASTE FIRST DIGIT GCODE (see point 5)
repeat for all digit positions then cancel work offset so that final profile is correct
4. This would become a little more complicated for a nest of parts but still achievable.
5. Use a spreadsheet to insert the correct gcode for each number in sequence via text concatenation.