Two things:
(1) Trials should last as long as the neural activity lasts for the stimuli in the study;
(2) You should always jitter the ISI.
As to your second question, you can not ensure that all subjects will not have any residual pain in the experiment. You want to minimize this from happening. This can be done with longer ISIs.
To optimize the design, use optseq2. To use the program you need to know how long the neural activity related to pain lasts as the program needs to know about your stimuli to select the best model.