How to make an object : Not rendered / but able to hide what's behind

Hi !
I discovered yesterday how to do a compositing out of two scenes (sorry if my question is basic ).

A little spaceship is wandering in a scene with multiple planets. I want to create a glare effect on the fire of its engines … and no other object should have this glare effect.

I made two scenes :
1°) Everything except the fire
2°) The fire … with the glare effect (this scene is a full copy of 1 … except that I opted out the rendering of every other object. )
I use a mix node with the two scenes with “add” selected.

It works great except that when my space ship goes behind a planet, the fire is visible still … which is quite normal and consistent with my method.

So how could I solve this problem ?
Is there a way to include the planets in the scene 2 without rendering it but maintaining their hiding ability ?
Is there any other way ?

T.H.A.N.K.S. !

Solved : I set the collection “Planets” to “Holdout” .