No matter how well you train your dog always will be the possibility that he will follow his natural instincts. Those instincts may lead him into danger. If you are worried some kind of danger may come to your dog if he is left off leash, than there is no other option than to keep him by your side, leashed…although to be honest that is not fair to neither of you.
The first steps in off leash training are to teach him as early as possible, and actually train him off leash. Some of us do the training while keeping them on leash and than wonder why is he not learning.