I have similar issues with medic class. Sometimes I use a gun that works flawlessly then the next game its complete crap
Assault: shotgun and automatico are nice and easy to use. Anti-tank for sniping.
Yeah shotguns or automatico are very effective and as you say the AT rocket makes a good sniper for the assault class.
Both Rela and Marbleduck posed new videos on weapon balance (or lack of yesterday), and both share some of the same conclusions (from a competitive balance point of view).
Rela explains in a round about way that while the weapons themselves may be balanced specifically for being powerful at different ranges, other parts of the game design work to undermine this (smoke effects, flinching, suppression and cover placement). He points out that the more you push people to use a difficult technique because it is theoretically the best technique (aim for the head with a low fire rate accurate weapon), by making the head hitboxes smaller, introducing smoke effects from the muzzle and by making the target flinch on a hit, an accurate followup shot is hard to achieve and hence you end up with the next best thing which is spray and pray.
Marbleduck actually states that the most effective weapons are often the automatico and model 10 hunter or slug because if you are playing the objective, with the cover design that exists in bf1, the majority of your encounters are within the effective ranges of these guns. Hence the assault meta.
For me the most effective squad will always have at least 2 assault and 2 medics (even on infantry only servers). Assault runs point and anti vehicle duties (or anti sniper building takedown), medics pick up the pieces and assist with the killing. You rarely need a support in your squad or a recon (arguably recon is better as they can use their flares, while you can pick up ammo from other team members, enemy team members or kits from fallen soldiers.)