If you "know" when a direct fire ship is going to unload on you and you're castling, don't be afraid to drop a WW to make all their weaps miss (as a WW is equivalent to 9 ECM).
I thought WW is 6 points of ECM?
I believe the formula to calculate defensive shift is
FLOOR ( SQRT ( Max( [your ECM + if you EM + if you have WW] - [enemy ECCM] , 0 ) ) )
In practice shift +1 is quite easy to archieve and should be your goal at all times.
Shift +2 is harder (i.e. more energy demanding) and should be attempted when you either have loads of energy to spare (castling) or is about to receive a volley.
Shift +3 is very difficult (IMHO) to get in normal games. You will need a combination of ECM, EM (Erratic maneauvers) and WW (tho not both). An exception being in a nebula where there is 9 points of ECM for everyone.
Shift +4 is, I think, theoretically possible. You can get 9 nebula ECM, 6 ECM, and 4 ECM from EM => a shift of 4 max in game. (you can't EM and WW at same time, so shift 5 is not possible, not to mention you can't WW in nebula)
Personally I think it's definitely worthwhile to spend the energy on a shift +1. And shift +2 as occassion demands.