Fit all objects to scene

Hello guys,

i need some help. I want to create a method that moves my camera back to a point, where all objects are in view. My Idea was the following:
while(at least one object gets culled) do move camera back by a certain amount
However I don’t seem to find a way to check, whether any object in my scene gets culled or not.
Is there a solution to do this? I’m also open to other approaches!
Thanks!