How to Implement dynamic texture in c++ plugin?

I have never really done this, but I would look into how MediaTextures work. The MediaPlayerPlugin is EditorOnly, so there you can see the factory and the asset stuff.
The rest of it is in the Engine/Runtime/Media and MediaAssets.

They are pretty much what you are trying to do, they render movies into textures that can be used in materials.