I saw many dozens of Dead shows and still see shows from the surviving members more than a few times a year. Robert Hunter wrote those lyrics and they had nothing to do with the real Casey Jones. Like many of his lyrics they are meant to evoke feelings rather than have a specific meaning. It’s totally open to your interpretation. As I recall from a Hunter interview by Alan Jackson, he meant it to be an anti-cocaine song and the part about Casey Jones was meant to be allegorical. The meter and rhyme fit.
That was a cover song that the Dead performed. Jesse Fuller wrote those lyrics.