It's quite difficult to comment the MAF signal - certainly it is affected by the glitches but I'd like to think it's the consequence. I have thought the error in air mass shouldn't have drastic sudden effect on engine power. Also EGR valve does very rapid movements which affect significantly to air flow.
Re the picture I don't remember seeing the blue stuff on mine (a few months ago) and mine was very clean. Anyways, not a bad investment to replace it as they won't last forever.
Yes, I would put my money on engine speed sensor - especially now knowing about implausible signal (of ?) in the past.
Well, if you drive would be interesting to have a log with these parameters - to trace any delta between crankshaft and camshaft sensors. In the list there are several items related to engine RPM but not exactly sure if they are any different - if even the item named as Camshaft actually is camshaft.
IDE00021 Engine RPM
IDE00075 Vehicle speed
IDE00182 Camshaft adaptation intake bank 1: phase position
IDE00347 Air mass: actual value
IDE00352 Main injection: duration of activation
IDE00405 Crankshaft speed (RPM)
IDE00406 Camshaft RPM
IDE04685 Setpoint generation interior torque
IDE07742 Cylinder head: pressure sensor 3 bank 1: raw value
ENG113719 ESM_Engine_speed
ENG126001 P_L_Aps_crankshaft_speed
ENG126043-ENG126092 P_L_Aps_camshaft_drift_angle-Camshaft target wheel drift angle
This also relates to new capabilities with modern controllers of HEX-V2 cable