Basically, you're not formatting a number. You're formatting a
String that happens to be composed only of digits. With DecimalFormat, you may be able to select the thousands separator, but there may be limitations on which characters are allowed, and it ignores all but the first occurence of it, so you'll always get the same number of digits between those separators (if you can even control that at all). You can't say "format this number into N digits then a separator then M digits then a separator then P digits." It's simply not what the class was meant for.
You may want to use regex via String's replaceAll() method, or you may just want to do the character iteration and insertion yourself.