Lloyd, I haven't worked through all your reasoning, but you last calculation for a 1mm (actually 25.46 TPI) pitch is certainly correct. So is the earlier one where (without a compound gear) you arrive at 20 TPI.
It is a very longwinded business to work out what gears you need to use to get a particular thread pitch. Programs like Nthreadp are only really helpful when you have a pile of gearwheels and want to know if they can be set up to cut a particular pitch. They don't help much at all when you only have a few odd-sized gears and want to know which extra ones might usefully be bought to cut standard pitches, or close approximations to standard pitches. As you said earlier, 3 is the magic number where inch threads measured in TPI are concerned. The 3 derives from the 24 teeth on the first driver divided by by the 8 TPI of your leadscrew, and means that for inch threads you need a set of gears where the tooth count increases by three, like the one I suggested. As an aside,if you had a 40T gear on your spindle, you would need a set in increments of five (40 ÷ 8 = 5).
However, help may be at hand. If you load the seven gears I suggested (24 to 42T in increments of three), plus another 24T to represent the one on your spindle, and also a 63T, and then try to find combinations for the standard metric pitches of 0.8, 1, 1.25, 1.5, 1.75, 2, 2.5 and 3mm (those being the metric coarse pitches for M5 up to M27) you will find various combinations offered with 24T as one of the drivers, and all within 1% error.
So, I suggest eight gears: 24T to 42T in increments of three, plus a 63T. If you want to get at the finer TPI pitches, you will also need a compound pair with one having twice as many teeth as the other.
Two last points:
It doesn't matter in which order the gears are assembled, as long as the ones specified as drivers are drivers and those specified as drivens are drivens. From your point of view, this means that where a compounded pair is needed (driven by your 24T spindle gear, and driving another gear on your leadscrew), it doesn't matter which of the drivens forms part of the compounded pair and which goes on the leadscrew. Swapping them can help when it comes to the practicalities of assembling the geartrain on your banjo (aka gear quadrant).
Gaps can be filled in with idlers, but bear in mind the reversing effect of each additional idler you add. Of course, this is of no consequence if your lathe has a tumbler reverse, which you can set so the leadscrew rotates in the direction you want.
My brain cell has got tired with all these sums, so I'm going for a pint.
Andy