An Alternate Universe example: What if what happened to the Real Life factory in France happened in the show before Jeremie turned on the Supercomputer? That would mean that Aelita and Franz would have died!
Some of XANA's attacks do border on this, especially if it's a widespread offensive. XANA-possessed characters can be particularly creepy, and many examples of XANA trying to murder the protagonists (like electrocuting Jérémie) can induce nightmares.
Most ways that XANA tries to kill Jérémie can cause Nightmare Fuel. Jérémie gets electrocuted by one of the power sources for the Supercomputer, as well as getting electrocuted by the specters.
Also, when he discovers that the one Franz Hopper is actually a polymorphic specter in disguise, it gets pissed at him, turns into smoke to invade his airways, and proceeds to suffocate him while Ulrich can do nothing but watch.
A lot of the psychotic expressions XANA-fied William makes.
Not just him actually, any xanafied person will often arbore a quite scary expression with Voice of the Legion to complete.
Want to make this concept even scarier? Watch "Ghost Channel" (where Aelita proves she's able to essentially do the same things XANA could do in the first season, and without needing the towers, could do so unopposed if she wanted to) and then imagine what she and XANA could accomplish if he was able to control her more often.
Jérémie scores one with the "Marabounta". Basically, sort of purple goop starts covering Lyoko, devouring initially every XANA monster, then going after the Lyoko Warriors. The heroes were definitively squicked — especially when it ate Yumi. (Seriously, just watch the scene where she is Eaten Alive by the thing. Imagine how she must have felt. You have to wonder just why these kids even do this.)
It really doesn't. XANA possesses Kiwi, Odd's pet dog, and uses him to spread a zombifying virus through the school. Most of the group is trapped in the cafeteria, and William is trying to keep them there (give him some credit, he doesn't know about Lyoko yet). Odd is bitten and Ulrich and William have to restrain him. Imagine seeing your best friend gagged and tied up and trying to bite you while moaning in the Voice of the Legion.
Jeremie gets bitten before Aelita deactivates the tower and has a horrifying transformation. He can barely gasp out 'Return to the Past now!' and his voice is already changing... if Aelita had been seconds late...
Who else shat bricks when we saw XANA's disguise of Jérémie breaking down from "Ghost Channel"? XANA Jérémie's "NOT LOGICAL! NOT LOGICAL!" after the kids decide that he's the fake Jérémie because he doesn't understand that Jérémie would virtualize himself to save his friends. And then the scene where he screams and then tries to kill the characters.
Let's admit it, Ghost Channel was the scariest episode of Code Lyoko's first season. For a season with episodes that were mostly Filler and that involved XANA attacking and the team having to deactivate a tower in Lyoko (and that were pretty creepy on their own), it really drove home what kind of a threat this nutcase of a computerized Omnicidal Maniac was, to the point where his pants-browningly horrifying One-Winged Angel form at the climax now serves as the page image. Good Lord.
There are also the attacks where XANA takes over animals and uses them to attack Kadic. So far, we got wasps, rats, birds, boar, wolves... the latter even had a scene with Ulrich falling in the middle of said wolves, who immediately start to attack him. The Return to the Past barely saves him.
The time XANA took control of a dangerous criminal.
Just how quickly Odd and Yumi deteriorate in "Ultimatum" due to being Locked in a Freezer. Yumi starts shivering first and by the time XANA has gotten tired of waiting for Aelita to give herself up, is reduced to being barely able to stand and weakly crying Odd's name as XANA prepares to kill him.
And then there's the added idea that Odd might have accidentally caused XANA's later attack of creating an obscenely cold blizzard by telling XANA that cold is lethal to humans.
The Zero Gravity episode. Think about it; the evil computer virus has taken control of FREAKIN GRAVITY to the point where it can just LAUNCH PEOPLE INTO ORBIT WITH EASE.
The amount of times Ulrich has nearly died in general. No child would be perfectly fine with that, not even mentioning how many of them were different e.g. burned alive/dehydrated to a dangerous degree, crushed, frozen, mauled to death etc.
The others don't escape either considering Yumi and Odd both nearly froze (Yumi twice), Yumi shared the Sauna of Death event and Jeremie, Yumi and Odd all nearly drowned at least once each.
Every member of the group has been electrocuted at least once. Everyone. And it's not Played for Laughs, ever.
In the second-to-last episode, the group decides not to send William to Lyoko since he just got freed from XANA's influence. XANA decides to make them regret that decision, and immediately possesses William's body again, prompting Yumi to devirtualize herself and fend him off to protect Jeremie. What follows is the most brutalbeatdown ever seen in the real world.
XANA as Eva has determined the fastest way to get a necessary item is to maim whoever has it. At one point, before getting on the airplane to France, she is seen with luggage, new clothing, and a computer, with no indication as to where she got any of it, except that the T-shirt is stained.