I've nailed the deck guns found on some merchants with my own deck gun but they continue to fire so, in my experience, you cannot "take out" a merchant's armament, the damage is only against the ship proper.
I've seen the AA cause damage (small explosions) to merchants but I've never wasted a lot of ammo from my own AA on a ship as I might need it against aircraft if I'm limping home etc.:hmm: