Well, I got it working by simply closing the window before generating the new PNG file.
If I ever want to try my more advanced idea (multiple images in history) then I probably need to have a look at your suggestions. But for now, this works fine.
I also don't want a separate window for every equation, that would become very unwieldy.
Right now I'm looking at some error trapping in the command line part. If the latex code is invalid for some reason, the compiler does not continue and my conversation window locks up. I am pretty sure I can retrieve some error information from the later compiler though, so it won't be a problem to check for that. The problem is I don't know yet how
But I'll get it hehe...