1) Prophets and Messengers don't talk and act under passions or hallucinations. and dreams are part of prophecy. (when you have a specific status obviously, don't come saying that all what you dream is then true... lol)
2) The moral is to show how loyal and submissive and the status of Abraham while having full certitude. Even if Abraham would have killed his son, God gives and takes and there would be a wiseness behind that. And Prophets and Messengers have specific status, they are not like regular human beings like you. There are extremists everywhere for everything, especially for the people who love to argue constantly or desperately want to be seen. Vegan extremists are also dangerous and are assaulting butchers.... so... lol LGBT extremists are also very dangerous actually reaching some high level of hatred etc to people who are not thinking like them.... and most Extremists in all religions are usually trained and influenced by internal gov agencies.... if you are talking about ISIS or Al Qaeda etc Hilary Clinton herself said that they created and funded them.... lol
Nobody is aware that there are also for exemple cops in civilian outfit during protest to start fight and burning stuff to decredibilize the movement and the protestation?
And Abraham was already aware about his Lord and His attributes as he had pefect moral and had divine knowledge since long time ago. He also asked God how he was reviving the death through birds, so why would he fear anything for his child?
2:260 And ˹remember˺ when Abraham said, “My Lord! Show me how you give life to the dead.” Allah responded, “Do you not believe?” Abraham replied, “Yes I do, but just so my heart can be reassured.” Allah said, “Then bring four birds, train them to come to you, ˹then cut them into pieces,˺ and scatter them on different hilltops. Then call them back, they will fly to you in haste. And ˹so you will˺ know that Allah is Almighty, All-Wise.”
Like also the vertuous servant who killed a child in front of Moise and was tested through him.
18:74 So they proceeded until they came across a boy, and the man killed him. Moses protested, “Have you killed an innocent soul, who killed no one? You have certainly done a horrible thing.”
18:75 He answered, “Did I not tell you that you cannot have patience with me?”
18:78 He replied, “This is the parting of our ways. I will explain to you what you could not bear patiently.
18:80 “And as for the boy, his parents were ˹true˺ believers, and we1 feared that he would pressure them into defiance and disbelief.
18:81 So we hoped that their Lord would give them another, more virtuous and caring in his place.
Does it mean that God allow people to kill children like that? You can see that the virtuous servant had a greater status than Moise who was himself a Prophet and a Messenger (actually one of the highest ranks), and you can also see by yourself that Moise didn't agree with this kind of behavior.
There is a reason for everything, it's like people saying why people are dying every day, why there are wars, why people do this and do that, why God allows this and that. They plan and God is planning too and God is the best of Planners.