Simple answer, yes, a (most commonly used) piezo pickup will pick percursive actions performed on the guitar.
However the result may be quite different from what you hear acoustically, as the sound is not reverberated by the guitar body and is not (obviously) air propagated.
In fact this is true even for the actual guitar playing. Piezo pickups are extremely convenient and have a sound that can be interesting for certain purposes, but this sound capture method is far from faithful. High end products try to compensate for that with electronics and results can become acceptable, but even so not the most faithful. (I'm not even entering into the issue of amplification, as you say your main concern is recording).
So, if you aim for fidelity of sound capture in a studio environment a ~150$ condenser microphone from a budget brand (say Behringer or Samson) will do a better work than a piezo.
Some high-end "electrified " guitars use an internal (real) microphone rather than a piezo (or a combination of both). I'm not familiar with these type of products though, so I don't know how they compare with an external microphone.
Now, a "not so high-end" factory integrated piezo does not make a guitar that much expensive, so perhaps going both ways, i. e. buy a guitar with a piezo and add the microphone later on if you're not pleased with the result in the studio (the piezo is always a good asset for a simple live or demo recording setup).
Additionally (as suggested by a comment from the OP), if both captured sources are available they can potentially be used together. Now I don't advise this route, as it may be more in terms of complexity and post-production work than one bargains for and the usefulness of the results is rather unpredictable. But no harm in discussing the idea, so here goes...
Consider that either the external mic or the piezo will capture both types of sound (strings vibrating and hand percussion sounds) to some extent. But tone and volume of each type of sound will be different in each sound source, so it's possible that they can be combined in some way to some advantage.
I suppose the best approach is to record the two sources in different tracks and later experiment with the mix to look for the best result (this is against the recording best practices of "keep it simple" and "get it right at the source" but I'm considering the special requisite to record the percussive elements and achieve the best balance and overall tone for both strings and percussive sounds). If one really does wish to take this to the extreme, EQ and compression can be used in one or both sources, to enhance the best elements of each source.
In summary, certainly possible and perhaps useful, but I would rather try a simple setup and focus on the music :-)