You need to look for numbers, not digits, so use Grep to find all numbers: \d+
Find all numbers and replace their contents with the value of the for-loop counter. No need to bother with what the contents really are.
Then you must work from the end of the found numbers to the beginning because the length of the numbers wioll change, e.g. 10 (two digits) may change to 9 (one digit). Like this
app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = '\\d+';
app.findGrepPreferences.position = Position.SUPERSCRIPT;
numbers = myDoc.findGrep();for (i = numbers.length-1; i > -1; i--){ numbers[i].contents = String(i+1); numbers[i].appliedCharacterStyle = myDoc.characterStyles.item("Sup");}
Peter