There's two things to consider when you write a recursive formula in BP:
Primarily if you call the object as its own process page, or if you call the object as an action page.
An action call will create a new instantiated object with a unique data set, attachment, and everything else. Like it's a fresh object being used for the first time.
A page reference will reference the same page, and use the same data/attachment and will retain any static variables as they were last set (static = do not reset at start)
Knowing this, you can implement your recursive call at the level at which you expect data and function to be maintained. That's kind of the rough outline as I've discovered.
[Edit] - We have multiple recursive objects that work based on variation of the DOM structure, or relative to a data set. Recursive calls work just fine, but vary in complexity given the objective.