There are a couple of things to remember about joint locks. I am going to discuss these from a standing joint lock position, but the same ideas are also valid on the ground.
When we practice standing joint locks, its never supposed to be just about the joint. However, we fall into that trap, thinking its just about the joint. You can easily find someone, who will stand there, and not move his feet while you apply the lock. They don't tap... they are either flexible enough or strong enough that you are not able to make the lock work, when focusing only on the joint you are locking. And they can slap you around while you try...
Doing the lock properly, means to get the joint out of the other guys power range. (the range of motion where he can use his strength) Additionally, you need to break his structure and take his balance. This means that he will not be able to generate power and will make it difficult for him to move... and in doing this, you need to also take out all the slack, from the joint you are attacking, through the spine and hips and down to the floor. Now, you can successfully apply the lock.
I see many people get this when doing the static practice. Then when sparring, all that body work goes out the window, and they focus only on the joint. Now they lose their grip, miss their grip or don't have enough power to make the lock work... All the things that you need to do for the static lock to work (listed above) need to happen when sparring... and are perhaps harder to achieve in all that dynamic motion. But, they still need to happen, in order to apply the lock. If you can apply all of those things, with the exception of applying the lock, then you don't need to apply the lock, you don't need to apply speed or power. You have broken his structure, taken his balance and captured a limb... Now you can do what you want... apply the lock slowly, count to three seconds, throw him down, hit him, kick him...
It has been interesting since our first choice of counter is usually to instantaneously punch free as soon as we sense anything like a lock attempt.
This means that those steps I talked about were not happening... allowing the other to be able to punch with power. As you said, you need a better set up.
The other thing that people miss with applying joint locks... is the definition of "works." That is, we only allow one definition, that being the guys taps out in pain. Yes, that means it works. But there are other definitions for works that we need to recognize. If I can take the other guys balance momentarily, break his structure momentarily or interrupt / change what he is doing... that is working too. In these cases, your lock becomes a set up for something else. Even if all you do is get the other guy to start reacting to you, you have taken the initiative... which is worth having in a fight. So, look for the openings created by your failed lock attempts... then your locks can work, to set up your next attack... or even to invite the punch you want to counter.