"advanced" and "permanent" parenting of objects. (especially their meshes)

Hello the problem is of such nature:

I might generate a few objects next to each other. just meshes. 3d shapes. Then I parent them all to a parent object, so all of those parts behave as one object.

the thing is that if I do it with many many composite pieces, I have a lot of "Transforms"/GameObjects, and I really need just one tranform/game object- which is a collection of those meshes. I'm affraid of performance hit if I make many such objects (especially if I don't need them to be able to be separated from the main object, later).

so the approach would look like this- randomly set positions of some 3d objects. enparent them to some empty object [then] this empty object gets all their meshes (at the places the 3d objects were generated on), so that we might leave just that parent "empty object" (not any more empty) and delete all those children/3d objects. -> we're left with only one gameobject/transform.

how could the steps that are after "[then]" be done?

Have you actually experienced a performance hit from this approach? If not, I would save this concern until you actually know whether it's worth optimising.

However, there are cases where you might want to do this to save "draw calls". To do this, make sure every mesh is using the same material, and use the CombineChildren script in Unity's standard assets. This will combine all meshes which use the same material into a single mesh.