It’s pretty simple:

FB Keeper.unit (7.1 KB)
The HPF is just to block any DC bias (though the ER-301 has AC coupled outputs, one can also use this in an internal feedback loop; having another unit in front of the VCA also helps make routing easier inside the custom unit). The VCA has a positive bias but the gain on the envelope follower is set negative. The output limite r isn’t really necessary if patching this in hardware, but in the ER-301 I figured why not have a little extra control over saturation and the output level.
The main idea is, the VCA increases the level when it’s low but the envelope follower suppresses it when it’s high. Works best with a delay, reverb, resonator etc. in the feedback loop so there’s more than just a noise floor to amplify.
I like my tanh[3], but I tend to use it for saturation or to change CV shapes instead of in feedback paths. It’ll eventually turn everything into squarewaves if something else isn’t managing gain anyway.