Kirk's "bad tactics" moment in TWOK was not bad writing, IMO. It was part of the theme of the film: he was a guy who'd been out of the game for a long time at that point who, having successfully flown by the seat of his pants and gutted out the perils of overconfidence as a younger man, had to come face to face with the reality as a middle-aged man that you can't get away with that forever. It was probably some of the best work either Shatner or the writers ever did with that character.
Kirk is most certainly not "portrayed as a tactical ignoramus" prior to that. His tactical competence in "Balance of Terror" is better sold and flows more naturally from the script and the events than much of anything we see with later Captains, Archer included. You could tell that script was written by someone who understood and had probably experienced the naval warfare for which the episode's space warfare functioned as analogy.
Archer can be argued to have spent a lot of time winning by writers' contrivance (admittedly I can't speak to much of the Xindi arc -- the show had mostly lost me by then); the same was frequently true of Janeway and her confrontations with the Nerf Borg and the absurd Species 8472, and I do note that the biggest threat she really
faced (the mad Krenim Annorax and his chrono-weaponry) she had to resort to a suicide attack to defeat.