You could always connect up the 'meaningless' transform nodes, with a message attribute to a more meaningfull object in the scene.
in python:
import maya.cmds as mc
mc.addAttr('meaninglessNull', longName='myMessage', attributeType='message')
mc.addAttr('meaningfullSphere', longName='myMessage', attributeType='message')
mc.connectAttr('meaninglessNull.myMessage', 'meaningfullSphere.myMessage')
=========
now when you optimize your scene, it will keep your meaninglessNull there. In the attrEditor in the extraAttributes dropdown you can see the meaninglessNull and the meaningfullSphere are now connected as friends.