The answer to 'when to replace pipe repair' is that pipe repairs should typically be replaced if the repair is not holding up over time or if the pipe continues to leak or have issues. Pipe repairs are a temporary fix, and if the repair fails or the pipe continues to have problems, it's generally best to replace the entire section of pipe rather than attempting another repair.
Factors to consider when deciding if a pipe repair needs to be replaced include the age and material of the pipe, the location and accessibility of the repair, and whether the repair has held up well over time. If a repair is in a hard-to-access area or the pipe is older, it may be better to go ahead and replace the full section rather than risk another repair failure.