I have my settlement autoturrets either elevated or positioned behind a chain link fence whenever possible, in part because it keeps the AI from knocking them out easily with grenades, even though you no longer see the kind of uncannily precise grenade spam that was common in the early 2016 build state of the game.

I like a staggering or wounding shotgun for dealing with enemies who rush you.