Definitely never use autoplace for defensive structures. To me, it looks like they are just placed randomly (which is obviously a bad sign).
Against the AI, I usually just build a repair and 3 turrets near the jump point into my well. There should only be 2 situations where an AI is attacking you, depending on where your fleet is. 1) Your fleet is in their territory (meaning their main fleet will be as well) so the attack is a pitiful bunch of seige frigs, with maybe some minor support. 2) Your fleet is in your territory (so it should be near where the AI will attack) and they invade with their main force.
The 2nd case should be a no-brainer. Your fleet should be able to enter and mop the floor with theirs. If they have a size advantage, build another repair bay or two to give you the edge. In the first case, I've always found that I can build the necessary defense before they do any real damage to my planet (usually just turret around the outside of the world to block off the seige frigs).
If you're playing multiple AI and you need to leave a choke point without a defensive fleet, always build a starbase and get at least one survivability upgrade before you send your fleet out and continue upgrading whenever possible.