Dynamic outline for UI elements

I would like to create an outline effect in UMG, similar to how I already made one for hovering over a sprite placed in the world:


Basically something like this:
image
image

This post is the closest I’ve come to finding something: How to add an outer glow effect to UMG visuals

The issue with this is that the solution makes an outline in Photoshop and then adds a second background image to achieve the same effect.
I have tens or even hundreds of different hoverable elements that would use this outline technique, and I would rather have a dynamic solution.

I cannot seem to find any way to do this directly, closest I’ve come is using a Retainer Box for an overlay material, but seeing as I want the outline on more complex widgets and not just a simple image, it can’t work either.

Anyone have an idea on how to achieve this?

This is what my widgets look like, if that would help: