I'm not Epeli or dev team that knows actual mechanic, but it seems that each pellet has their own accuracy. If it missed the main target, it'll choose random target on its cone radius, calculate the accuracy based off New range percentage, and the rest is as usual.
Shotgun has really bad accuracy and it's capped at 80%. Leading shot will gives you much better accuracy on 2-tile range or more, while barrel stare requires you to shoot on 1 tile range (melee), which removes Leading Shot bonus and makes the accuracy, usually, a lot worse.
You can help the accuracy a bit by taze, flashbang, or trapping enemies, which reduced their evasion
As for lower damage, makes sure you choose the correct bullet. Check on the Combat Log on how many damage resisted each pellets. Imo don't use 12p, it offers nothing much compared to 6p or 20p. Only use 3p on bosses, since it's quite heavy and expensive.
The general rule of thumb for armor is, most animal other than closed psi beetle, and leather armor bandits / stalkers / lurker : 20p, while the rest is 6p. 3p is good against anything, but recommended for very heavy armor guys, such as protectorate or end-game robots