One thing you should do: add stackview as a subview of self, set it's frame to self.bounds, and define a custom layout to enforce this always whenever self changes size (you could also set up the stackview flex, but that's slightly more complex using objc). That way, the flex settings in the custom UI.View will let the view live more naturally inside pythonista views. And by having the stack as a subview of your custom view, higher level views don't need to use objc to interact with it.

One problem you will have is that subviews of the stackview will be unable to use superview, since the superview isn't a python object. You could add custom attributes to subviews in your custom add_subview, to point back to your custom view as the"real" superview.