I also somewhat doubt that getting gecko to render using d3d will change much on Wine compared to the software/GDI path.
On Windows, it would imply a separate node in compositor for MSHTML, which then may rely less on WM_PAINT. Anyway, it'd be far off for Wine. One more possible experiment is to see if the bug happens on Windows with disabled acceleration.
After all, all the code does is forward some WM_PAINT events to some child windows, of which only the Wine-Gecko component actually draws anything.
While ieframe is usually used for embedding MSHTML, it may be used for any other OLE document in theory. You can't just assume it will be Gecko. There are some special cases in ieframe for MSHTML, but building on that does not seem great.
There are also various OLE interfaces that ieframe uses to notify documents about actions. Maybe we miss something there?