Comparing transformer set ups
The allowed input voltage of the 1:6 transformer has to be equal or higher than the output voltage of the 1:40 one.

So, while it's no problem to cascade e.g. a 40V—1V and a 240V—40V transformer this way, you cannot e.g. cascade a 40V—1V and a 6V—1V transformer.

Actually, it's not voltage but flux but given the both the frequency and the waveform are identical for the primary and the intermediate primary, it boils down to voltage.

Please revisit your script about the transformer core “eating” electrical voltage-seconds during a half-period and turning them into magnetic flux. This flux is limited by the size and properties of the core. It must be de- and countermagnetized in the second half-period without ever reaching excess flux which would oversaturate the core, with all its consequences.