Megatron Encoder spike in the measurements

Agreed. It's not a spike. This simplest way to verify that is to comment out your 12bit resolution statement

 analogReadResolution(12))

so the output is 0 to 255 and plot that. If there is no "anomoly" (gap) when using default resolution then that's your answer.