One of the problems I have with flushing out the shifters with WD40 is that no-one advises that you should relub the shifters again. Everyone runs to point out that WD40 is not a good lube for chains, yet possibly expects it to be for shifters. When I do mine, I lightly oil inside the shifters... not enough to run everywhere, but enough to get to the moving parts to be effective.
As to the cables and outers, there is sound advice in taking them apart, and pay attention to the housing from the chainstay to the derailleur itself, plus the bottom bracket guide which can get gunged up, especially with energy drink slop and road muck.
You don't have to take apart anything to *service* the cables. Just shift the bike up to the biggest cog on the rear and the biggest cog on the front, then when you stop, "ghost" shift all the way down on both levers. This will slacken the cable off enough so you can remove the outers from the cable stops on the frame, and move them along the inner cable. With a bit of patience, you can spray solvent such as WD40 down the outers to clean them out, along with the cable. With modern cables, the general advice is to NOT apply lube of any form to them -- the nylon inner and stainless cables seem to do OK themselves. Using this method, you then don't have to worry about threading through an old cable with the risk of fraying the end, and then having to retune your shifting. It all goes back together the same way you got it apart -- and make sure all the outer cable ends are well seated in the frame cable stops, wind up the slack cable by shifting the levers, and you're set to go.
Of course, keep an eye out for cable strands that have frayed -- there is some chance a fray has worked its way back into the rear derailleur housing, and that can play havoc with shifting. Lube also the pivots on the derailleur parallelogram after cleaning them with a shot of WD40.