Do it man. If people are stupid enough to buy it then that's their problem.
Don't be that guy.
Don't increase human misery. The surest way to increase human misery is to seek to profit from human stupidity.
That doesn't mean you have to believe in what you are designing/selling. To believe in something, you should understand it. You don't and can't understand everything. Of course, that doesn't mean that you shouldn't try and learn. In fact, you should try and learn, because, as an engineer, more understanding leads to better designs and better solutions for problems.
Now, while you don't have to believe in what you are designing/selling, you should not design/sell in something about which you have serious reservations. Designing and building implements for more efficient genocide to someone's spec doesn't get you off the hook, nor should it. Of course, not everything is so clear cut.
Gambling machines are something I have trouble with, because they exploit human frailty. E-cigs are a little more complicated. At some point, they were a mitigation for human frailty, now though as traditional cigarettes continue to dwindle, while e-cigs are growing quickly, and people some people are cultivating their creation of second-hand smoke, its harder.
Ghost detectors... well, at first pass, I'd say NO, don't go there. You are feeding and exploiting a pathology. On the other hand, I think that "ghosts" and things like them are an unavoidable emergent property of the human condition. Our species has flourished due to a capacity for rational though coupled with social tendencies. Both of these things lead us to want fairness and predictability, but the universe is chaotic and indifferent. Collectively, we fill the gap with many things, ghosts included. And if some of us need ghosts, then some of us need to know whether or not ghosts are present, and therefore, ghost detectors.
From one point of view, I'm not sure a ghost detector is all that different than an "artwork" a painting, or a sculpture, or a performance, like a play, a concert, an action movie or pro wrestling match. However, I think there is an important distinction to be made. A painting, a sculpture, a play, a concert, or an action movie aren't making to be a serious claim to be reality, they all depend on the ability to suspend disbelief, to understand that something is an artifice while at the same time, being able to feel real emotion, to react to it as if it were real.
On the other hand, their is pro wrestling. Some can appreciate it as an athletic sort of theater (not that they'd call it that) without having to believe that it is "real," and then there are those who grow enraged at the suggestion that there is any artifice to it at all.
So, where do we put a ghost detector? It think a concern with ghosts need not be a pathology, just as gambling or drug addiction isn't a pathology that afflicts every, or even most people. One can flirt with ghosts the same way some of us pump $5 into a slot machine when we pass through Nevada, or my mother manages to enjoy one cigarette a week. But a ghost detector seems like the sort of thing that only appeals to someone with an unhealthy obsession with ghosts. The question then is, is making a ghost detector likely to bring relief from that obsession, by helping them manage it, like, say, methadone helps heroin addicts manage their heroin addiction, or does it just feed it, by, at the very least, draining them of resources needed to meet basic needs.
So then, even after more consideration, I would say NO, having thought to wonder whether making a better ghost detector is ethical, you shouldn't then conclude that you should make one.
I'll ask you a question now: Why are you contemplating the ethics of making a better ghost detector? Are you drawn to it because you like contemplating the ethics of such things? To understand why some people choose to work on things you consider unethical? Because you want a (profitable) project that isn't strictly practical? Because you want to understand how people can come to buy something like a better ghost detector?