It's more along the lines of King subconsciously inserting himself and his struggles at the time into The Shining.It gets into a weird area if you analyze it too much. Because if Jack Torrance is Stephen King, who's Danny? Joe Hill? Is Joe Hill an alcoholic? There's a lot of child abuse in his books as well. Was Stephen King abused as a child? Did he abuse his children?
King was an alcoholic, a new writer worried that his first couple of books were only successes by a fluke, worried about supporting his family and dealing with anger issues. He's come out and said that during that time he would feel genuine hate in his dark, drunk moments for his family, and be horrified once sober at his thoughts. It's easy to see how Jack parallels his life in that time.