Oh I ran into all sorts of problems, I don't know why. I'm not using RichMemo directly, I subclass it a couple of ways, and perhaps that's the reason ... anyway, I ended up with Lazarus kinda borked. But a reinstall later and everything went smoothly.
I will get back to you about the pictures and memory usage but I have suuuuch a lot to do rn. But the undo stuff is working great, thanks!