You could do it by exporting 2 separate renders, but there is a way to automate the whole thing inside Blender. That’s what my example scene does: when you hit render, it automatically does 2 renders and combines them with the compositor.
You need to first know about the existence of view layers.
By creating 2 view layers, you can break a render in different parts, which you can individually modify and put back together in the compositor. Each view layer allows you to change the visibility settings of each collection, which render passes are output to the compositor, and if you are in Cycles, the ability to override the number of samples (this can be useful if you have to render an object that needs a different number of samples than the rest, you can render it separately and save on render time).
In my scene, there is a “main” view layer where everything is visible, except the fog, which is an object in a disabled collection. So this view layer renders the solid scene without fog.

There is a second “fog” view layer where I have made the fog collection visible, but the main collection has been set to holdout. Holdout causes objects to become transparent holes in the image, so the different parts of the image can be put back together as if they had been rendered together. You can activate the holdout setting in the “filter” menu.

Here is what the holdout does. The objects become invisible, but in a way that still blocks what’s behind them, leaving only a transparent background. That way, you can just drop this render layer on top of the rest with “alpha over” and it will just fit perfectly, because the parts of the object that would be behind something else don’t get rendered.
In the “fog” view layer, I also added a holdout sphere object around the scene, so the entire background behind the volume can be transparent. If I don’t do that, there would be an opaque sky in the fog view layer and It would complicate the compositing. I did this particular holdout object using a material (the holdout feature can also be done in materials).
When you have your render layers prepared, you can just go in the compositor and duplicate the existing “render layers” node. You can then change which view layer each one uses.
Then, I combined them using an “alpha over” node, which simply uses the existing transparency of the render, no blending modes required. This is possible because I rendered the fog with a transparent holdout background, and because the non-rendered objects were carved out of the image with holdout, everything fits as if they had been rendered together.
At this point, everything should work and you should get a fully rendered image when pressing the render button.
Now, if you wanted to get really fancy, there is a way to go even further. You will notice the “render layers” node in the compositor also has a “scene” option. Blender lets you have more than one scene in the same .blend file. You can see the scenes list right next to the view layers list at the top of the screen.
If you were to duplicate the whole scene using this feature, you could have 2 versions of your project in the same file. You can then set one of them to render with Cycles and the other with Eevee and mix the 2 renderers automatically in the same render. One really great use of this is for adding Eevee volumetrics to a Cycles render. Eevee’s volumes looks almost the same as Cycles’, except they render way faster.