There is no guaranteed technique to stop the fight and ensure the safety of everyone involved. (Well, running away has a high success rate, provided you are in a place where you can run and are more fit than the assailant).
If you knock someone out, you're giving them a concussion. Concussions are a form of brain damage and you can never be sure how severe the actual concussion will be. You cannot be confident at all.
If you apply a blood choke to cause someone to lose consciousness, they will be incapacitated from a few seconds up to a few minutes - but it's hard to gauge how fast they'll come back. These tend to have higher reliability in terms of quick put-down with less damage, BUT they're also hard to get to in a fight - you have to fight to get into a position to apply them, typically. Many security or police forces are also forbidden from using blood chokes due to the fact extended holds cause permanent brain damage from oxygen deprivation.
All other forms of pain compliance are a gamble and usually the pain disappears right away or a few moments after the technique is no longer applied. Adrenaline, alcohol, or drugs might make a person not feel the pain in which case they can still fight back with whatever means they have available. For people who do feel the pain, you might be able to completely immobilize or control them depending on your training.
However, most pain compliance holds require lots of skill to "jump into" against an attacking opponent. You usually have to fight for position before you can get to a good option, and that may involve striking for distraction... which again leads us back to space for injury and concussion. After you get a pain compliance hold, if the person doesn't feel pain or is very aggressive, you might end up breaking one of their joints or tearing tendons, even without trying.
Martial arts as an entire endeavor across the world exist simply because no one has come up with "the few easy ways to win most/all of the time and not hurt people".