We will certainly talk about the capacitors
(5) Now let us calculate the dissipated powers of R1 and LM317 when Vbat_max = 8.1 V
About LM317:
Vin = Vbat_max - Vdiode - I_load_max * R1
Vin = 8.1 - 0.8 - 0.2 * 4.7 = 6.36 V
The voltage drop on LM317 is:
V_drop = Vin - Vout
V_drop = 6.36 - 3.3 = 3.06
Therefore the power dissipation of LM324 is:
P_dis = V_drop * I_load_max
P_dis = 3.06 * 0.2 = 0.612 W
Note:
To be sure that P_dis = 0.612 W is maximum, we should find P_dis in function of I_load first:
P_dis = V_drop * I_load
V_drop = Vin - Vout
Vin = Vbat_max - Vdiode - I_load * R1
Therefore:
P_dis = ( Vbat_max - Vdiode - I_load * R1 - Vout ) * I_load
P_dis = ( Vbat_max - Vdiode - Vout ) * I_load - R1 * I_load^2
The derivative of P_dis is
dP_dis / dI_load = ( Vbat_max - Vdiode - Vout ) - 2 * R1 * I_load
The maximum of P_dis occurs when dP_dis / dI_load = 0
0 = ( Vbat_max - Vdiode - Vout ) - 2 * R1 * I_load
I_load = ( Vbat_max - Vdiode - Vout ) / 2 / R1
I_load = ( 8.1 - 0.8 - 3.3 ) / 2 / 4.7
I_load = 0.425 A
Since I_load_max is 0.2 A only then P_dis = 0.612 W is maximum (in general it may not be so).
(6) About R1:
P_r1_max = I_load_max * I_load_max * R1
P_r1_max = 0.2 * 0.2 * 4.7 = 0.188 W
Note:
If R1 is not added this 188 mW would have to be also dissipated by the regulator.
(7) Now let us assume that the 12V SMPS is active. In this case, [condition_1] is always satisfied.
Note: Even if the battery is also connected, its diode voltage is reversed hence I_bat = 0
(8) SORRY, to go on we need to know the possible minimum voltage of the 12V SMPS. Is it 12V or lower?