If tori's only possibility of applying a technique is by inflicting excessive pain on uke, he's completely missing the whole point of aikido. The art is supposed to neutralise uke's hostile intention, and reach a situation where tori is in a safe positon and uke has lost said intention.
Example : tori applies ikkyo on uke ; he pins uke's arm on the ground ; the technique is applied successfully when the nervous-muscular tension in uke's arm is released, which means uke's immediate intention has been neutralised. On the contrary, if tori puts all his weight on the arm, for instance, the tension won't disappear, because of the pain. The technique doesn't work.
On the other hand, 'uke' does not mean 'dummy'. He is supposed to 'stay in character' in relation with the exercise and tori's level of skill. When practicing the techniques, we 'pretend' uke is not an aikidoka : he is hostile, tries to strike or grab... So if he wants to be honest all the way, he should continue trying until tori is successful. Tori inflicts useless pain ? As soon as uke breaks free, he is entitled to answer back according to the tactical situation. If it results in a good punch, so be it.
It will always be better than any legal action.