Its not impossible, but find a better engine (and a forum with actual support).
Ue4 is a mess.
Most features don’t allow altering geometry in runtime.
Potentially the peocedural mesh component is a workaround.
Conceptually.
Writing a PNG16 - the standard for heightmaps - is expensive.
Doing so at runtime is ill advised in any system (and you’d need that to save the terrain data).
Data being data, you could just set up a multidimensional array and store height values directly.
This too is expensive, probably just as much yet maybe a little less.
The costs come in while processing (much like the image) - since you dont have to generate a file you have a step less. And no need for file I/O since you can possibly store it in a save game.
Either way, the concept is similar (been the same for 20 years).
You store the Z value of each vertex of set size mesh.
This often does not update collision with most engine tools, which is where possibly the procedural mesh component could help.
On older stuff - Cave, the game - this process would occur with both visual and collision geometry (To be more precise, Cave used a Matrix to generate the terrain, same diff though).
UE4 is literally unable to do that out the door (using landscape or a mesh) without major tinkering.
Performance wise, you want to look at write times when dealing with image files (varies grately on the system), and Processing times when dealing with data sets (varies grately based on processor speed).
Rendering wise doesn’t really matter (because you are acting on Ram/CPU).
Additionally, regardless of what you move (sub or terrain) the number of drawcalls and tris on screen are still going to drive (possibly sink, excuse the pun) the performance most.
Now.
Moving terrain is safer for all systems.
Because of floating point precision.
If the player remains at 0,0,0 and everything moves around them, you’ll never reach zones where animation issues start to occur due to a loss in precision - floating point errors.
Either design the world that way, or levarage the existing (or a custom for other engines) rebasing sytem to fix that. Just make the choiche early as it defines how you work.
It’s really not that ambitious, its just that you need some hands on knowledge on 3/4 of the engine or more to achieve it.
Weareas, if you pick something like Godot you may find a proven generation script…
I’m all for learning and doing things myself, but imho the engine has many other pitfalls that would keep me away from it to make something this simplistic…
The other thing you ought to consider is final deployment:
What system does this need to run on? Base your choiches, modeling, artwork, gameplay, etc. On that.