everything I'm about to say is based on my moderately-limited knowledge of how computers work so don't entirely put your faith in it
paint.net has never blocked me from undoing stuff
if there is a limit, it's pretty damn high
if the program doesn't limit it, then eventually you'll run out of memory and it'll crash, which would be pretty bad since paint.net doesn't keep up with changes unless you save the file
I think Flash allows for pretty much infinite undos. I think it saves your history in the FLA file, unless you do Save And Compact which clears it so it takes up less space.
that might work. it'd take up drive space instead of RAM, but that's a lot less limited so it doesn't really matter
but any changes that were made after the save, or after the load depending on how it works, would still use RAM, so it still wouldn't be entirely unlimited in one session, I guess