The story works if you believe the ghosts are real. However, it works just as well, and in my belief better, if you believe the ghosts exist solely in the mind.
Only if you make up your own plot details.
Yeah, because I believe Horatio may have had an upbringing that made him vulnerable to the suggestion of ghosts is that the equivalent of my introducing Jack the Ripper into the plot?
Yes, actually, it is exactly the same. Jack the Ripper is more outlandish but equally supported by the text: not at all. You have given Horatio this back story; Shakespeare has not. Shakespeare created a character
who does not believe in the ghost until he sees it. Granted, if a new poster showed up in the General Skepticism and the Paranormal subforum and said, "I started out as a skeptic. When my buddies said they saw our pal's father's ghost, I didn't believe it until I saw it myself! It was really real, for sure!" we would question him. We would point out the fallibility of human perception and memory. But
Hamlet isn't an Internet forum for skeptics. It's a 400-year-old play. Shakespeare does everything he can to establish the reality of the ghost without sacrificing the drama.
The soldiers in Hamlet never heard the ghost speak and only the fellows who had to take the late shift and probably were the simplest minded of the soldiers saw a ghost in armor through the fog. They were probably drinking on the job and put the whole ghost of your dad walking around at night in Hamlet's head to begin with.
Objection: assumes facts not in evidence. Again, you are making up your own play. There is absolutely nothing to suggest that the soldiers are simple-minded or that they are drinking on duty. Oh, and Marcellus and Horatio do apparently* hear the ghost say "Swear" several times, as well as "Swear by his sword."
*I say "apparently" because it is always Hamlet who immediately responds to the ghost's admonitions, but Horatio says, "O day and night, but this is wondrous strange!" provoking Hamlet's response, "There are more things in heaven and earth, Horatio, / Than are dreamt of in your philosophy."