First you must choose a planet, which should be a bottleneck and only accesseble by two or three sides where at least one is controlled by yourself. You then need to completely max out the tactical slots of that point and set up a star base(s) and phase jump inhibitor(s).
Devote all upgrades on the starbase(s) to attack, defense, and hanger upgrades. If you are against a late game TEC player it may also be necessary to use the auxillaury government upgrade to counteract a novalith threat. Lean heavily on fighters from the hanger upgrades as opposed to bombers to avoid an enemy fleet destroying the starbases using bomber spam. Surround the starbase(s) position with Hangar and Point Defenses around it. In the centre create a cluster of Repair Platforms, depending on the planet this choke point is found in, aim for 3 platforms. Around all these defensive structures place the maximum allowed number of mines , to severly weaken enemy ships that engage the defensive structures.
A common mistake players make is to cluster minefields near the entrance to the gravity well. This tactic is ineffective and inefficient. Use mines to deny ship movement to human players, and to damage select target ship group movements on AI players.
The phase jump inhibitor coupled with the starbases passive ability will seriously deter human players from skipping the gravity well. AI players and unconventional human players who skip the gravity well without destroying the defense nest will be forced to face the next gravity well's defenses or fleet with fewer numbers, weaker hull, and no antimatter.
The final, optimal situation you should find yourself in is the opponent attempting to engage the defending fleet supported by 3 repair platforms, 2 starbases, bombers and fighters and minefields. ideally, use the mines to stop ships attacking the defense nest. Ships that pass through a mine field are inevitably doomed. In the late game, these defenses can be built at every planet, making any proposition for a conquest of your empire a problematic plan indeed.