Most of what you mentioned can be achieved with a more simple script: trigger set to a certain condition (AT guns destroyed) loads a submission which contains required action (tanks spawn and attack).
4000+ lines scripts are more similar to dynamic war generators than to a single mission script.
E.g.
Operation SeaLion mission with generation of sea convoys and landing parties, airfield capture, basic resource management, aircraft limitation, vulch protection, etc. is about 3000 lines.