My only note here is that, on some original replacement engines I have seen (including the one that is in my own car) the area where yours is stamped with the engine number, is 'blank' meaning the installing dealer did not stamp anything in. The fact that, on your engine, the area where the individual engine number is stamped, indeed appears to have been ground down at some point, suggests to me that this engine likely was installed in another car before yours. Making it a 'second-hand' engine and not likely the original, if we can even call it that, replacement engine.
As we can learn from this, it's very easy to make any engine appear to be the original one: just grind down neatly the area where the number is stamped in, then re-stamp the original number in with a correct die set (I happen to have such a set). Voila, 'matching numbers'.