I tend to agree with you that John went back to Yoko at the end of the Lost Weekend because he was afraid of his own violence. In her book, May Pang basically described a madman. It wasn’t like John had to be restrained once - what she described was incident after incident of him drinking himself into a stupor, smashing up houses, grabbing her by the neck and blacking out. That he didn’t kill her (or Jesse Ed Davis, come to that) was surely only a matter of luck. It makes sense that he would rather be under Yoko’s control than in prison for murder.
Sort of? I don't think John really feared prison, not truly. Otherwise he wouldn't have acted out the way that he did. John knew that he was being given passes on everything thanks to being a rich white guy, May also recounts an incident in LA where the cops are called out to the home they're staying at and instead of putting John in the drunk tank to dry out, the cops ask him "will The Beatles ever get back together?" And then they patted him on the head and left.
John did fear his own violent tendencies but I don't think jail was a serious concern for him. When he nearly strangles May in the hot tub she showed him the bruises the next day and he burst into tears. He knew exactly what he had done. I think that specific incident is what changed something, it happened slowly because these things always do. But it was soon after that John admitted to sobering up in the middle of a session, looking around him and realizing that everyone in the studio was drunk and high. And after that he worked with Larry to put the album together and left LA to go back to New York. And we know what happened after that.
I think that John was shaken by the incident even though he was too cowardly to take responsibility for it. I think it reminded him that he could kill someone very easily, just like when he attacked Bob Wooler years before that. John was prone to forgetting that he could hurt people because he was so used to thinking of himself as the person being hurt by others. But it's said that when Paul left for Scotland with Linda and the children that John took to his bed in grief and Yoko later confessed to Janov that she considered leaving John because she didn't know how to react to it. John wanted to hurt people (Wooler, Paul, May) and then was stunned by how damaged they were by his physical and emotional assaults.
The hot tub murder attempt was the final straw. John finally realized that he wasn't controlling himself. He went back to Yoko because he knew that she could control him and maybe he wouldn't try to strangle his girlfriends to death anymore. It had nothing to do with jail because John knew that he would never go to jail because he was famous and rich and beloved. Not even Paul was willing to apply consequences to John, opting to simply leave the area instead. Yoko however, did. She made John eat out of metaphorical dog dishes. Paul and May were not willing to do so and therefore John went to the side of someone who knew exactly what he was and was willing to do something about it.
The point of Yoko was not that she was his soulmate or whatever claptrap John spouted to save face. It's that he didn't know how to act like a human being anymore and she was the only one willing to bend him back into that role. There's a layer of self harm to it too, John knowing that he nearly killed 2 people because hurting them was more important than controlling his anger, and that he drove away his life partner through emotional terrorism. Going back to Yoko and being under her control, under her heel, was the position he wanted to pay penance from.
The John depicted in "Loving John" is the natural end result of a decade of drug addiction and substance abuse. Hard drugs are not like alcohol, they change who you are instead of revealing who you are. Becoming an addict is like coming out of Pet Sematary, you are innately changed and fundamentally different. The old version of you is dead and will never come back. Even if you get clean. He acted like a madman because he was one and no matter how many pills he ate, a lifetime of bad decision making and regret crushed him daily.
May was good for John but he was terrible for her, as he was terrible for everyone who eventually got close to him. It's not a mistake that everyone kept their distance after a while.
John encouraged it of course. Mick tried to contact him in the Dakota a few times and John's answer was always the same: "leave me alone." John understood what he was at long last and protected his loved ones the only way he knew how. By staying away from them.