A few thoughts:
MsMpEng.exe is the executable file for Windows Defender, the antimalware app built into Windows 11. Similarly, mpengine.dll is related to Windows Defender.
Not all DLL files can be registered. In particular, esentprf.dll is a non-registerable DLL file, so the error when you attempted to register it using regsvr32 is expected and normal.
Given that the errors are being thrown by Windows system files, and especially the error "access violation error (0xc0000005) ... The memory could not be read,” coupled with the fact that these issues seemed to start after you upgraded the RAM, I suspect that there is a problem with the RAM module (but see the thread here: https://www.tenforums.com/performance-maintenance/75627-event-viewer-error-open-procedure-service-esent-dll.html)
I suggest downloading and running MemTest86. This is a free utility: https://www.memtest86.com/
Start with "Creating a boot disk in Windows" here and then click "Usage" for more instructions: https://www.memtest86.com/tech_booting-memtest.html
You misunderstood me a bit. I reinstalled Windows with a clean installation and formatted the hard drives, using the original factory RAM (2x8GB), specifically because applications started crashing with access violation errors. Thinking the issue was caused by the RAM, I bought new RAM (1x32GB).
And i did MemTest86. No errors.
Well, at least now I know the problem isn’t with esentprf.dll.
I’ve tried a lot already. At this point, I even managed to get Windows file verification to stop showing any errors. I updated using a Windows ISO file (downloaded from Microsoft site) while keeping settings and files - although it only worked on the sixth attempt or so, since the update kept failing and rolling back to the previous state.