One of the earliest examples of 'preventative' flap gates was the retrofit on the B707 B model and later C models at 14 Flap following the accident at Windhoek in the mid 60s when the flaps were inadvertently retracted after take off (possibly snagged by F/Os shirt cuff when retracting gear?).
411A can probably expand on this incident