Unfortunately, blueprint cannot preserve copper cables so the only thing which I can do is to describe this build and provide save file.
This is how outpost in save looks like:
And this is a combined scheme with energy flow and combinator logic inside (I've removed multi guard support to make it simpler):
Laser turret has the highest energy consumption priority, this means all other objects will be powered only if laser turret is fully powdered, and we are playing on this. Guard turret is located in a separate network with a single accumulator in it, as a result when turret is firing every other object in this network won't recieve any energy. Also, an arithmetic combinator (Red + 1 => Red) with a backloop is located in this network, this combinator is connected directly into the second combinator (Each * -1 => Each) which is powered from the main network. Output values from these combinators are going into the main power switch which is used to enable main defense. So two different situations are possible:
1) guard is not firing => first combinator is enabled => its output is A on current tick, second combinator's output is -(A-1), because on the previous tick we had A-1 value from the first combinator => A + -(A-1)=1 => Main power switch is disabled
2) guard is firing => first combinator is disabled => its output is A on current tick, second combinator's output is -A, because on the previous tick first combinator didn't increase its value => A + -A=0 => Main power switch is enabled
Also, I've added day/night sensor in this build.
The core component of this sensor is an always-empty-accumulator, it is always empty because its charging rate is limited with 300kw, but it has more than 300kW consumers. Because the always-empty-accumulator is a part of main network it recieves equal share of extra energy (which is used for charging accumulators), 1kW from this energy is immediately spent on arithmetic combinator (Black + 1 => Black), because its located in the first priority network. Left energy is drained into the radar to prevent charging the always-empty-accumulator. And when we don't have any extra energy in main network arithmetic combinator will be disabled. So, this combinator is used in the same way to connect guard's accumulators to the main network when we have extra energy, and to disconnect them when we don't have energy.
This means, guard accumulator can be detached from the main network during biter attack in the day time.