Initially it's a basic situation of good and bad. Pigsy the one representing crude desires is powerless and accepts the intoxication of drink and women without struggle. Quickly he renounces the walk to collect the sutras and is reduced to the level of an animal. Sandy is next. His symbolism has always been enigmatic, I believe it to be something to do with abstract philosophical searching: he never has much role, and always offers irrelevant analysis of situations. Fish is often associated with knowledge and intelligence anyway (maybe practically in its dietary effect on the brain). Anyway these are powerful demons and Sandy succumbs readily too. Both desire and intellgence are soon fooled, intoxicated, attached and literally married to the illusion. The demons are now almost in full existence. Only Monkey and Tripitaka remain. For once it is Tripitaka, they acknowledge, who is the greatest challenge for them.
Monkey's response to the evil is opposite is Pigsy and Sandy. As usual he detects its demonic nature, and typically he opposes it and fights it. Monkey is the ego: out of our control, self determined and always jumping around; basically irrepressible but useful because his self assurance is powerful and he looks after himself and his own very well. Being egotistiocal his relationship with those around him is always oppositional (either playfully arguing with foolish Pigsy or aggressively with demons). However these are a different type of demon from those before: if he believes in them (like Pigsy and Sandy) they will exist but by opposing them he is only making them exist all the more strongly. He cannot win, and quickly is given the choice by the girl: give in or run away. He runs away and joins Tripitaka.
Tripitaka (the monk) obviously represents the seed of enlightenment. Never sure up to this point in the series on the correct path, this time he is clear that they can neither fight nor run away. This is beyond a simple case of good and bad. He at least will surrender. Monkey is proud and loyal and follows his. So they are taken prisoner. All 4 now face death.
The demons owe their existence to the belief and imagination of the 4, but as long as they depend upon them they cannot be sure they exist independently. They need to kill them to prove that they exist freely from their captives minds: so in doing they will gain completely free, independent and solid existence.
One of the demons however doubts this and at the last minute she turns upon the demon king and ends the illusion. Everything vanishes and all 4 are free. What does it mean?
Firstly I shall explain very generally. The whole of Monkey and Buddhist teaching is aimed at teaching that it is our "thoughts which create the world" (as said in the narration at the start of every episode), or better it is the Mind which create the world. When it says "thoughts" or Mind it does not mean Monkey (the ego) creates the world. When we think "I am thinking" (Sandy) or "I want to rule Heaven and create the world" or just "I am going to do this or imagine that" (pure Monkey) or "I desire that" (Pigsy) or "I want to learn the Sutras" (Tripitaka) this is Ego (which monkey also generally represents to) not the Mind. The Mind creates all these thoughts listed and more. The Mind (if anything in Monkey) is the narrator himself who with words and pictures creates the stories. Our 4 characters, the demons and the places they find, are all created by the story, aka the Mind. In this episode they are learning not just to revel in their surroundings (like Pigsy) or analyse things (like Sandy) or change the course of events (like Monkey) according to their wishes and desires, but rather to surrender and ignore the demons and obstacles that the story (their mind) throws up. Without belief and attention fueling the illusion it vanishes and the story ends. The mind they will learn is what puts everything together into the problems they encounter each week.
More specifically I now write. All the things of the world are created by our minds, just as everything in the episode is created by the story. The demons represent ordinary things which because they are very attracive to the 4 travelers become an issue and distraction from the goal of gaining the sutras (which represent the achievemnt of truth). Not everyone passing through these place will find these demons - hence why they seem to lie in wait. Actually they are ordinary things, but because the travellers believe them to be attractive and special they become so. Thus they are distractions and become obstacles and the demons come into existence. The illustration is drink, girls and enjoyment to attract Pigsy and Sandy. "What is wrong with enjoying yourself" says one of the girls philosophically to Sandy as he falls under the spell of this hedonism. (A poignant question to todays rational and capitalist world).
Secretly we know that the Mind has created our obstacles. In reality when we become wise for example we get bored of things and they evaporate - forgetting them we normally don't wonder how they changed. Attraction draws us deeper and deeper into our obstacles, and intoxicated we wish they were really existing so we could feast on them and really gain something from them. Soon the belief that the things we like really are likable, gives way to no wish to escape the illusion (the blue pill in the Matrix 'story'). As we give ourselves up to the object of desire we are exchanging our very power to have an attraction and find something attractive for the very attraction itself. We are handing it the power and becoming its slave. This is the way we kill ourselves with desires and this is the strength of the demons. Its no good to reject the things we like either, because this does not stop our like for them. A classic learning curve for most religious people. When we reject things we still believe that the power of attraction is real and separate from ourselves, otherwise we would realise distance can't help. The ignorant run away like Monkey (becoming the subdued puritan here).
It is Tripitaka who has Buddhist teaching already! (strange if he is going to get the sutras) who realises that there is nothing that can be done. If you fight them you will become evil also he tells Monkey, i.e. they will become stronger and beat him. He neither gives into the objects of desires nor runs away. He (and Monkey) is then trapped (again :-)). For ego this is very painful and Monkey is suffering in the vat of acid. The next bit is not woven into the story I don't think. Tripitaka has sowed the seed of the end of the story here because he does not believe the demons fully. He is neither fooled into intoxication nor fearful - just trapped by his mind. The demon power is already weakened. The scene is set to end the story.
Already weakened it is then through the demon who has intoxicated our philosophical fish Sandy that the ray of enlightenment comes. "If we are created by these 4 prisioners how can I exist if they are dead". The very desire which has Sandy's mind transfixed suddenly realises its complete dependency on Sandy and so realises its own emptiness. It kills the king demon and so all the desires and illusion is ended. The obstacle is gone and all are free to pursue Enlightenment.
The narrator ends with the statement "Each day the clever mans learns something, but each day the wise man learns to accept a bit more uncertainty". The point and relevance is that it is our fixation on definite things which begins the path to evil. Rather it is with a mind which gives up definite things, realising that the interest and attraction for specific things, and the rejection and boredom of other things is all set in motion by ourselves. Reality is not a definite thing, it does not come in the shape of good and bad things, demons and heavens, or interesting and boring things, nor does it make sense like a story or even this explaination of the episode! Its just a matter of seeing the Pigsy, Sandy, Monkey and Tripitaka in ourselves, and doing the crazy journey for real (and being a little irrepressible to).