A microphone is definitely the best solution, sound-wise. And indeed almost certainly cheaper than anything built-in, if it is supposed to sound anywhere as decent. You don't necessarily need a large-diaphragm mic, though it should be a condenser. Small-diaphragm ones are available for as little as 50$ these days; you may want to spend a little more (e.g AKG perception 170), but even with a Behringer C2 you can achieve a pretty good sound (provided you guitar offers it acoustically; room acoustics are also very important). This being already true for simple strummed rythm guitar, and for percussive styles the advantages of a mic become more pronounced: all those body components will come out just as you want them predictable and all. Really, the only good reasons not to use an external microphone is mobility on stage, as well as feedback issues.
Now, as for the alternatives – obviously there are gooseneck or similar microphones to be attached to / built into the guitar, which offer basically the same advantages but with less optimal placement in exchange for better convenience. These can sound almost as good as external mics; the main problem here is feedback. So if you don't need to play very loud live, this might be the ideal thing for you. But you'll probably need to spend a lot more money, and also have to try for yourself which models fit your guitar well. Especially with unusual and "acrobatic" playing styles, you must still be sure not to hit and/or move the mic somehow, which is perhaps not so easy to ensure. So again point for preferring an external mic for the percussive stuff.
Then there are various types of contact microphones/transducers. These can sound very different: some will lack tone definition, amplify all touches to the instrument over the top, and have even stronger feedback tendencies than microphones. It requires a good parametric EQ ready to fight such issues. But some such systems give a really good compromise between direct-string pickups and microphones. In particular with regard to percussive playing, you'll have plenty of attack, though it may sound uneven and way too loud when tapping close to the transducer. But this can be integrated in your playing style, for instance you can get certain very deep, throbbing "bass drum" sounds that are basically impossible to achieve with any other amplification system. A model I've made good experience with is the B-Band BB1470.
Next, there are magnetic pickups. Obviously they only work for steel strings, which you seem to use. These pickups work in principle the same as electric guitar PUs, but sound quite different because they have a way lower inductance (the high inductance is what smoothens out the treble range in electric guitars, removing the "acoustic edge"). They can get quite a nice, very direct and bright yet "warm" string sound, but are pretty much useless for amplifying anything percussive. Yet, it might be useful to combine a magnetic PU with some microphone system, so you have loud, clearly defined tones in addition to percussion & ambience. In particular, magnetic pickups are very selective to the "body-side" vibrations of the strings, which eliminates your mid-neck hammer-on problem (though I daresay that's something you should try to tackle with playing technique: don't hit right between the frets, rather aim right on the fret you want and only then slip you finger behind it).
Finally, there's piëzo bridge pickups. The most widespread type nowdays, the simplest and in many ways most straightforward way to amplify an acoustic guitar. That's most likely what you have in your guitar already, so you know the character – very "crisp", but often unpleasant, lacking depth, "resoncance", as well as percussive components anywhere but right at the bridge. Such piëzos can quite well be combined with contact transducers, because of the contrasting sonic properties (rather dull but very body-oriented, resonant). Since you already have a piëzo, this is therefore a combination worth consideration.