tracebox is often not viable for detecting visibility. it basically means that a player can hide slightly behind a corner and the box will always hit the wall instead of the player, making them invisible yet still able to hit the bot.
really, visibility needs an inverted bbox of sorts, but engines don't support this (there's not enough overlap in q3bsp for it to be practical there, either).
(engine-wise, tracebox is trivial to implement, all the functionality is already there, you just need to make a new version of the traceline builtin that actually passes the sizes through, instead of '0 0 0')
you should instead track which part of the player's bbox you *can* see, and aim at that instead of directly at their origin. normally it doesn't matter which part of their bbox you hit, so long as you can actually do some damage (rockets should normally be aimed at the feet, for instance, so you can get splashdamage even if you otherwise miss).
presumably you'll also want to use the aiming point rather than the actual eye position, just to guarentee that you don't hit walls (quakeworld clients added a v_viewheight cvar which is normally set to -6 (view=+22, gun=+16, difference is -6), so this is fair game in such a context, and even if it is slightly cheating the simplification means you can justify it in your ai). the origin of guns does not include any forward component either, so just pretend the eye is at origin + '0 0 16', the same point as the gun.
shooting rockets though tiny gaps is always funny, and will help a little with the holes on the floor on dm4 (for example, unintended rocket jumps otherwise). the bars on dm2 won't be affected too much as they're vertical anyway.