Everyone needs to do this from time to time. Rules!
Start from a clean, corrected image you don't want to mess with Levels several layers later. Exception: if it's going back into a video, be sure not to touch the original at all it has to be seamless.
Whatever it is, it doesn't have to look like what it would have looked like without the scratch/dust/finger/tree/logo/person-in-the-way. It just has to look right. If that pipe is indistinct, enhance it draw in most of a new one if you have to.
Not too soft, not too hard. The stamp may be your best friend while stamping, but a too-fuzzy brush and you'll see unintended objects and unwanted ghosting you won't have enough control. Too hard and you can see it. Go fairly hard, though.
Clone from an existing layer and stamp onto a new layer, to keep the original intact. Paint large patches rather than small ones, because the image itself is real and your additional painting isn't. Too much focus on one area and it becomes noticeable. Too many strokes in one area looks wrong.
Noise! A clear area of flat colour replacing a scratched ugly one might be a good idea (might not) but it won't look right unless it's got a natural amount of noise. This will vary depending on the image source, but computer-generated images are too smooth for the real world. Noise it up with Add Noise or a big sharpening brush. Focus should match as it would in a photo.
Jump to New Layer, AKA New Layer via Copy. Very useful when retouching a section of an image make a rough selection, New Layer via Copy, then edit that copy. No need to duplicate the whole thing, you can move it around if you need to, and you can play with its opacity/blend mode for finer control. Command/Ctrl-J. Don't use New Layer via Cut. It's evil. For anything except straight, square edges, the image won't look the same as it did before the Cut you can see half-present edges around where the cut was made. Use New Layer via Copy and hide the original layer.
Always edit at 100% for retouching, or an even multiple if you have to: 25%, 50%, 200% etc. Not 66.7%. Whatever you're doing, all the time. Working at 66.7% or 33.3% will show artifacts and will confuse whatever you're trying to do, especially text.
Erase sparingly. Once it's gone, it's gone. Work on a duplicated layer, be ready with Undo, and use non-destructive methods like Quick Mask when deleting, or use Select > Inverse and New Layer via Copy.