Since it's the body resonating that makes an acoustic guitar audible, anything that picks up vibrations of the body will pick up all vibrations of the body, which will necessarily include the vibrations of the strings as well. The strings are coupled to the body through the bridge, so all string vibration is transferred to the body.
What you could do is gate the output of a contact mic so that the gate only opens when the output of the contact mic is loud enough. Then you can try to set the threshold on the gate so that percussive hits that are louder than the loudest strums of the strings will open the gate. That will give you some separation, but you'll have to make sure you make your percussive noises loud enough.
An expander instead of a gate would be a bit of compromise. I think if you want to have effects applied only to the percussive sounds, an expander on the contact mic before the effects might be a cool way to go. That's because you could have the effects apply to the guitar chords also if you just strum them hard enough. Also, when the expander opens, both the percussion at that time and any notes/chords being played at that time will be let through to the effects, and I think that might be a really cool sound. Sometimes trying and failing to solve a "problem" leads to some unique inspiration.