In free space we can express Maxwell's equations as \begin{align} \varepsilon^{abcd}\partial_bF_{cd}=0 ~~\text{ and }~~ \partial_aF^{ab}=0 \tag{1} \end{align} where $F^{ab}=-F^{ba}$. The most general solution to the above equations is \begin{align} F_{ab}=\partial_aA_b-\partial_bA_a. \tag{2} \end{align} Since partial derivatives commute it is evident that the field strength $F^{ab}$ is invariant under a gauge transformation of the form $\delta A_a=\partial_a\phi$ where $\phi=\phi(x)$ is an arbitrary scalar function on space-time.
Due to its anti-symmetry, the field $F^{ab}(x)$ has only six independent components. The first relation in (1) imposes four relations between these six components, leaving two independent degrees of freedom (the two helicity states of a photon). The second relation is used usually used to determine the components of $F^{ab}$ in terms of the current and charges densities. So we have two degrees of freedom for the observable field strength $F^{ab}$. However, equation (2) states that $F^{ab}$ has four independent degrees of freedom, the components of the field $A_a(x)$. We must conclude that there are redundant degrees of freedom contained within the 'gauge field' $A_a$.
To eliminate one of these unphysical degrees of freedom we choose a 'gauge fixing condition' where we impose a relation among the components of $A_a$. For example we might require that it be divergenceless, $\partial_aA^a=0$, this is known as the Lorenz gauge. If we impose this gauge then there is still some residual gauge freedom in that $A_a$ is now defined up to some arbitrary function on space-time which satisfies $\square\phi(x)=0$ (since such a redefinition respects the Lorenz gauge and leaves $F^{ab}$ invariant).
My questions are:
What kind of gauge fixing conditions can we impose? Can they be completely arbitrary or must they satisfy some requirement? For example, could I (for no good reason) impose the condition $A_aA^a=0$?
In this example, choosing a gauge condition eliminates only one of the two unphysical degrees of freedom in the gauge field $A_a$. How do we eliminate the second? I would think that it has something to do with the fact that it is defined up to a term $\partial_a\phi$, but I don't see directly how we can use this to kill another degree of freedom.
In general, if you are constructing a gauge theory and you do not know in advance the dynamical equations of motion a certain field must obey (in this example equations (1)), how do you know how many physical degrees of freedom the theory must possess so that you can impose the neccesary gauge conditions to eliminate the unphysical degrees of freedom? Is it determined by the type of particle you are trying to describe and the spin degrees of freedom it possess?