@jens55 Yes, I think it needs to be done in the slicer somehow, or a post process script.
With mixing hot ends, one can use the new filament to purge out the old. So when changing from one colour to another, I used to advance the tool change command within the gcode file so it actually changed tools "n" mm of filament before it would otherwise do. This meant that I could actually print multi-colour objects without using any sort of purge tower. To accomplish that, I had to write a little python script which would read through the gcode file, find the tool change commands, go back through the file and calculate the new position by summing the "E" values backwards from the original tool change point, then delete the tool change commands and re-insert them at the new points. But it gets complicated because the new change point might be inside a long XY move so I also has to segment such moves into two parts.
One would need to do something similar in order to pre-heat a tool by changing it's standby temperature at some point in time before it becomes active. That point in time might well be part way through a long G1 move so it would have to be segmented in order to insert the new standby temperature command.
There was some talk at one point about the firmware being able to run two or more parallel gcode streams but I don't know what the status of that is. That would be handy for such situations. One stream could contain just the G1 moves, the other could contain the tool heating/change commands.