Switching terrain heightmaps in real time?

Is it possible.in a game to switch the heightmap of a terrian or use noise in game and make your own heightmap and apply it to the ue5 terrain system? Im trying to make a game where you cab dig into an infinite terrain so i was thinking about making it so you can edit terrain heightmaps to lower terrain where you dig and i can make infinite terrain by adding terrain chunks infinitley (which i can do) and then i want to add fractal noise heightmaps, i know how to make the heightmaps but not add to terrain