Comping is one way around it but I never do that. I'm more of a sectioner than a comper.
I'll comp vocals, but generally for instruments, I'll keep going until I hit it ... doesn't have to be the whole song, but a verse / chorus is my minimum unit...
Not that there's anything wrong with doing that ^^^....but it's really no different than comping.
Punching in (or doing it in sections, if you will) is basically what comping gets you, only you can do it post-tracking.
There are some people who have this notion that comping is somehow a "fake"....but really it's not, it's simply about grabbing portions from a few of
your best performances and constructing them until you have a complete track.
You actually DO play each take all the way through...just like the guys who do 100 takes to get that one perfect one.
Personally, I find the punch-in and section recording approach more of a PITA for getting a solid track, than just recording a few complete takes/tracks, and then comping from them into one.
Part of that comes from the fact that I'm still tracking to tape, as there's something about keeping those reels spinning once you hit REC rather than stopping throughout...
...but even though I can do punch/section recording with the tape deck, more so it's because I think you lose some of the feel/energy when you have to do a track piecemeal.
Doing a few solid takes in quick succession yields almost identical performances, where punch/section recording might not.