It would be good if the exit button in every routine allowed you to tap out of the workout due to injury or inability to complete the required reps.
A pop up box could then open asking why you’re stopping the workout and you tap either experiencing pain or too hard.
If experiencing pain is tapped you could ask where the pain is so that future exercises can be modified to exclude that muscle group. Then the amount of exercise achieved could be logged and not lost due to the inability to complete the exercise.
A pop up could appear in subsequent routines to ask if the affected area has healed yet. If no carry on, if yes recalculate the routine with a suitable reduction in requirements to allow rehabilitation of the muscle without requiring it to attempt what caused the injury in the first place.
If too hard is tapped then options to reduce the weight or adapt the bodyweight routine could be offered. That way you’re encouraging people to carry on the routine and feel the sense of achievement having overcome that obstacle.