3d heat profile with opacity
First, give each of your objects a white volumetric emission shader.  The strength doesn't really matter that much as long as you use the same material on every object so the relative density is consistent.

For the objects themselves I am using a collection of Metaballs.  Meta-objects will "blend" into each other similarly to what you are describing.



Now set set your background color to black and render.  This will result in the following black and white map.



Next jump over to the compositor to remap this to the color gradient you want.  First plug the render into a Normalize node to remap the range of the render to [0,1].  Now run that output through a Color Ramp node and set up whatever gradient you want.

I also found that it gives a result closer to your reference images if you also add a small amount of blur.



The result looks like this: