The people on the show would be considered public figures, so if there was information that the fictitious writing was actually based on/about them, defamation must be proven to a different standard for public figures. Public figures, including officeholders and candidates, actors or musicians successful enough to be held in "the public eye," have to show that the defamation was made with malicious intent, which is a greater burden than defamation for the average person. Also, damages may be limited to actual (special) damages unless there is actual malice. Special damages being lost income or some other quantifiable measure of loss.
If one cannot tell who it (the fictional story) is about because the name is changed, then Fox, or whomever, couldn't sue anyway because they need standing, which they wouldn't have if you called the person X, unless the story was so exact that it is obvious who you are talking about. For instance, the show Law and Order is often based on famous stories in the news, or criminal cases they dig up. Those fictional story lines often add or delete details. The case may be more or less damaging to the actual person it was based on. However, they make a statement before the show airs that says something like "Any similarity to real people or events is strictly coincidental. This show is not based on any real person or event, but is a work of fiction." If I were going to make a fictional account of a big network show, I would use some sort of disclosure like that to be safe.
That said, if the statements or storyline is less damaging than the facts themselves, as revealed on the show, it isn't defamatory at all: Defamation necessarily must include the act of making untrue statements about another that damage their reputation. If it doesn't damage their "good character or reputation," than it's not defamatory. Keep in mind, however, that what you may consider less or more damaging may not be the same view held by the person it's loosely based on. That is why I'd use the disclosure.
As to the question "would it protect you against a lawsuit?", if you mean would it protect you from being sued, the answer is always, anyone can sue file a lawsuit. That doesn't mean they'll win but it still means you have to defend. It may likely protect you in your defense.