It's common knowledge now that Luke's father is Vader, but when EP5 was released, everyone was surprised.
The unthinkable idea that the enemy the hero fights was the hero's parent had an impact on the world. For Lucas to ensure that the impact of EP5's release would reach audiences and cause a stir, he had to keep it strictly a secret by the time it hit the screen, right up to the time the lines were uttered. If everyone involved in the production of EP5 knew, it would be leaked as a spoiler, or worse, it would become a rumor. It is not only difficult, but impossible to completely control the information. That's how great Lucas's deviant and extraordinary ideas are.
So Lucas deceived himself, the actors and the entire crew. He wrote a fake script. The actors would read their lines and act on set accordingly. When the set was ripped apart and the entire production team was relieved, the real lines were secretly recorded. Nowadays, it's getting easier to convert audio with computers.
And when the actors saw themselves on the screen, they were as astonished as the general audience around them.
'I'm your father!' (Did I say that?)
So the management of information in the script was accomplished with great success.
On top of that, Lucas only confided his secrets to the screenwriter, whom he trusted more than anyone else. Both of them had the skill to deceive the entire production team around them. That person was Lawrence Kasdan. At the time, he was an unknown quantity, and he took the opportunity to make a career out of it. He must have been very happy to learn that Luke's father was Vader. He was truly the chosen one.
This experience may have inspired Lucas to create the setting for the new trilogy in which the Supreme Chancellor confides to Dooku that he is Sidious. It would be a shame to keep the secret alone, but it might be more convenient to let someone else in on it. Lawrence Kasdan was very tight-lipped, so Dooku decided to be tight-lipped as well, and following the success of EP5, the Clone Wars project was a success.
Now, in The Force Awakens, the entire production team is filming with their phones, or being monitored on external sets by satellite. We live in a world where anyone can buy a drone. The actors playing the role are worried that their story and lines will be leaked to the outside world.
But JJ, who may have been taught by Lucas about managing information in a script, may be grinning. That's where Mr. Lawrence comes in again. Translated with www.DeepL.com/Translator (free version)