Does thermal energy include the kinetic energy of the electrons? Or is the kinetic energy of the electrons not counted towards the thermal energy? (In other words only the energy of the lattice structure is counted)
 A: If I understand correctly, the question is: is the bulk motion of electrons taken into account in the thermal energy?
Thermal energy is energy that is distributed among the degrees of freedom of your system. 
"If a system contains N molecules, each with f degrees of freedom, and there are no other (non quadratic) temperature-dependent forms of energy, then its total thermal energy is":
$$U_{thermal}=Nf\frac{1}{2}kT$$
This is temperature-dependent energy. Now lets look at the degrees of freedom among which it could be distributed (depending which modes are available).. it includes $\frac{1}{2}mv_x^2$, $\frac{1}{2}mv_y^2$,...,$\frac{1}{2}\omega_x^2$ etc.
Now the equipartition theorem states: "At temperature T, the average energy of any quadratic degree of freedom is" $$\frac{1}{2}kT$$
This kinetic energy due to the temperature of a substance is distributed equally among the available degrees of freedom. 
I think the kinetic energy you are referring to is bulk motion, which has nothing to do with the equilibrium statistics of a system. 
The subtle aspect here is that a system can be in thermodynamic equilibrium with its constituents obeying bolztmann statistics while the system as a whole may be moving. Try this for a thought experiment; imagine moving the "microcanonical ensemble" at a constant velocity. Are the bolztmann statistics affected if you are in the reference frame of the moving "box of particles"?
Ref: Schroeder page 15 <3. 
