I found a quite excellent analysis of Religion how it is explored and depicted in Star Trek.
The author is clearly a person of Faith and I happen to not agree with the commentary, but the analytical part of the article is fair and accurate to both sides as far as I can tell:
The article clearly shows that Star Trek was originally intended as secular in nature but could not afford to outright condemn Faith except when the story clearly showed false gods like Vaal for example.
During TNG, when it was more save to embrace science and the absence of human Religion, the show did so. (ironically TNG also sort of established an Intelligent Design concept to humanity and other civilizations, "The Chase", though hardly in a spiritual way, more like the ultimate power of science version)
The pendulum starts to swing a bit in the other direction when Roddenberry was out of the picture and other people with different worldviews take over.
DS9, Voyager and Enterprise do the opposite as TOS. While they don't outright declare Faith as the right way and talk about stuff like that directly, they soften up the pure secular stance of TNG and keep some loopholes for the validity of Faith.
So in the end it probably depends on which ship we are talking about, if a Chaplain would be out of place or not.
In fact, Enterprise is the only show where I could see this as somewhat realistic, as it is closest to our society and there is probably more of a remnant of organized Religion that 2 centuries later.
Allthough I am sure that an Atheist worldview and entirely secular nations for the most part are clearly on the rise after First Contact and the abolishment of poverty, war and many many illnesses.
If there ever was an established character filling the role of a chaplain, it was probably Chakotay as the most spiritual person in all main casts outside of Kira (she was spiritual, but happened to have proven entities filling the role of her gods, divinity is still in question, since the wormhole aliens presumably can be explained scientifically, even if they defy the explanations of Starfleet scientists... so far.)
I seem to remember that Chakotay took on a guidance role for a spirit walk for Janeway?
One of my least liked episodes, as it's full of what I would consider mumbo jumbo.
Doesn't jive to well with Christianity, too I imagine, but shows he softer angle Voyager took toward spirituality in general.