Yea read that after I posted, but there are little easter eggs of many of his things. IIRC not long ago he basically said all his stories tie back to Dark Tower. Hard to say if he ever actually intended that originally or came up with it later.
I think he envisioned it the moment he started including the Man in Black in many of his stories, with different identities. Usually as Randall Flagg or R.F.. Though for The Gunslinger (Book 1), I can't remember if he ever named the MiB - they may have but it would have been Walter o'Dim I think. To be fair, I don't think the MiB was linked with the Randall Flagg identity until later books, so your question may still remain unanswered.
He has had numerous stories though that have linked the characters - if it wasn't the intent when the first book was written (as a series of short stories), it wasn't long until that was the intent. I can't remember when it was made clear in The Dark Tower series, but the various identities started to come together it appears back in the 80s, perhaps limited though... ? It does appear to have been made clear for sure, if not before, then around the mid-90s with some stories then.
(I just got out of a long Wiki dive. Need to breathe! Last stop was the Byzantine Empire. WTH?! lmao)
If you wiki Randall Flagg, you'll start finding the right links that are relevant for the character.
https://en.wikipedia.org/wiki/The_Eyes_of_the_Dragon appears to be the point the link may or may not have been solidified. If it wasn't, then it appears to be fully linked by 1998.