Rather than trying to use UMG in C++ Iād recommend taking advantage of BlueprintImplementable Events to tell UMG whatever you want it to do from C++!
way you can do all the button creation logic in C++, and just send the parameters to BP / UMG to build and initialize the buttons.
Wiki on BP Implementable Events
https://wiki.unrealengine.com/Blueprints,_Empower_Your_Entire_Team_With_BlueprintImplementableEvent