I'm almost sure it is Andromeda Lost Galaxy, an 80s anime movie
I watched it a long time ago (and I found it very scary, too,) so I don't remember the plot perfectly, but I remember some pieces, like the two sibilings as protagonists and the machines (spiders, but also some kind of bats) entering the heads of human beings and taking control of them.
One of the main characters was a kind of samurai-girl, who tried to help the two sibilings, if rings any bells.
From the linked site:
Andromeda Lost Galaxy (Hepburn: Andoromeda Sutorizu in the Japanese original) is an animated film based on the manga comic written by Ryu Mitsuse and drawn by Keiko Takemiya. The anime was produced in 1982 by Toei Animation and aired for the first time by the Japanese network Nippon Television on August 22, 1982.
The story tells of when on the planet Astria in the Andromeda Galaxy, Prince Ithaca marries Princess Lilia of Ayodoya, crowning him king of Astralta III. Unfortunately, the honeymoon of the happy couple is cut short, when monstrous machines from another planet invade Astria, with the intention of controlling the minds of humans and terraforming the fertile and green planet, in a desert inhabited only by forms of mechanical and artificial life. After the king and his ministers are assimilated by the alien machines, Queen Lilia and her newborn son, Prince Jimsa, must flee Astria. However the natives of Astria are unaware that the exiles from the planet Murat (the source of the enemy) have actually selectively bred the royal lines and Prince Jimsa is the final fruit of their efforts. It is intended to lead their resistance against alien machines.