There are actually 2 functions in engine that are very similar to the unwrap function from my blog. both would require just a little bit of tweaking to work.
That one unwraps it facing the camera (in any orientation), but it positions it centered on the bottom edge. You would probably want to tweak it to center on the center of the UVs to make it align with the render target more easily.
That one unwraps only facing up, but it was meant to be used with the “Render to Texture Blueprint toolset” and it has some scalar parameters inside the function that are not exposed as pins. “Unwrap” is a scalar that is meant to be either 0 or 1 to toggle the unwrap, and “Render location” allows setting the center to a specific value. So you could start with either of these functions with just a few tweaks. Should be easy to add pins for the 2nd one, or just create and MID and set them using a BP and it should work ok.
Re: triggering, there is an actual event you can call on them called “Capture” that triggers a single frame to capture. Using movement will most likely not work for sub-frame changes like this.
You would apply the unwrap material just before doing Capture, and then re-apply the original material right after.