#1 I know we said "Grounds, grounds, grounds!" and you checked and cleaned them. BUT, go back and make sure the two ground studs, the threads and nuts on the passenger side rear of the intake manifold are shiny metal clean, as are the wiring eyelet terminals, and use a star washer between the top nut and the terminal stack for maximum conductivity.
#2 Check both halves of any wiring connectors (stepper motor & CPS) for dirt/corrosion/bent pins. Check the shell half going to the PCM for continuity to ground (Black) for the CPS. The leads to the stepper motor are not grounds, they are position coil inputs that move the plunger in and out to match the timing demand from the PCM.
#3 If cleaning/trouble shooting of grounds and connector halves doesn't fix the problem, your most likely culprit is the CPS being bad. My guess on the first time setting both codes was because the stepper motor could not compensate to the amount of timing difference being sent to the PCM by the CPS, so it coded too. The second time the CPS was sending an out of spec signal for degrees of offset to the PCM, but the stepper motor could compensate.