Yes that is very simple
Unity does this already for you
If you have 4 GOs in the scene and they already have their desired positions / rotations in the world, just parent them together. Unity will keep the objects world position and orientation. That means .position and .rotation will stay the same but the actual .localPosition and .localRotation will be changed automatically to match the new parent.
A simple example with two object:
GoA: position(10,0,0) rotation(0,90,0) localPosition(10,0,0) localRotation(0,90,0)
GoB: position(10,0,5) rotation(0,0,0) localPosition(10,0,5) localRotation(0,0,0)
// When you make GoB a child of GoA, like this:
GoB.transform.parent = GoA.transform;
// this happens to the coordinates:
GoA: position(10,0,0) rotation(0,90,0) localPosition(10,0,0) localRotation(0,90,0)
GoB: position(10,0,5) rotation(0,0,0) localPosition(-5,0,0) localRotation(0,-90,0)
As you can see, the world position will stay the same, but the local position will change. GoB was offset by 5 on the z axis but when it’s a child of GoA it has to be offset by -5 on x because GoA is rotated by 90° and the local x-axis of A points into the negative z-world-axis. Also the rotation of B has changed to revert the rotation it inherits from A.
That’s all a bit messy, just try it yourself. It’s the same when you parent GameObjects in the hierarchy view. The position / rotation you see in the Inspector is the localPosition / localEulerAngles