Residual stresses are naturally elastic stresses (since else the part/specimen would deform). If you have the info of micro strains in your material, you can calculate the residual stresses backwards through Hooke's law.
The idea is that each EBSD pattern represents a direct projection of the crystal lattice. Any elastic deformation becomes visible within the pattern. Required is a reference pattern as comparison. The rest is projective geometry. Sounds easy, but the major problem is that we are talking about extremely tiny shifts so that any inaccuracy like "incorrect" position of the source, distortions due to the optics or magnetic field (SEM or sample), etc becomes essential. For semiconductor materials the developed software can deliver quite impressive results. For more technical materials it is more challenging because of the missing reference patterns and blurring of the patterns which reduces the precision of the cross correlation. In other words, the theory is comparatively (!) simple, but the experiments are challenging. You need high resolution images which enable the detection of the pattern changes. And...unfortunately a simple increase of the resolution does not help since the physical blurring of even perfect patterns is comparably huge. A band edge is not sharp but has a width of about 10 pixels. You do not win that much if you describe the same edge by 100 pixels.
I agree fully with Gert Nolze's answer above. Residual stresses are measured in diffraction by looking at the elastic strains, manifested as very small changes in the lattice spacing in particular directions. EBSD is not used for this purpose.for the reasons he outlined. There are several other techniques that are well established for thhis purpose.