Yonkyo is all about control of the elbow. That's what gives you the leaverage to take them down, the pain is just a come-along complience device.
This is why all wrist locks tipically require you to have kuzushi. If you have their balance they are not walking away from you, and all the wrist locks I know of (except kotegaeshi and possibly yonkyo although I really dont concider it a wrist lock but more of a pressure point) require control of the elbow. if you can't get the arm into the right shape the lock isn't going on. But I've found in standing grappling situations people love to put their arm right into a nikkyo. Its best to hit it and not wait there but use it to transition to something else, another wrist lock or something worse. Just a nice jolt of pain. But you can't' just grab the hand and start trying to twist it. Your going to have to take their balance first or wait for them to put their hand in a stupid place. But I find the same is true for an armbar. I can't just grab a guy and arm bar him, I've got to wait for the right position or create the right position via kuzushi or a takedown/throw.