Hey...
There a couple of ways to approach this, but here's a method that keeps it simple, but consistent. I hope you don't mind Python code. You should be able to translate it into MEL, if necessary. The following code uses locators to perfectly align objects relative to their pivots and initial locations, after zeroing them out at world zero.
import maya.cmds as mc
def zeroOut(*args):
sel = mc.ls(sl=True, tr=True, r=True)
for each in sel:
loc = mc.spaceLocator(n='tmpLocator')
zero = mc.spaceLocator(n='zeroLocator')
pcon = mc.parentConstraint(each, loc, mo=False)
mc.delete(pcon)
zcon = mc.parentConstraint(zero, each, mo=False)
mc.delete(zcon)
mc.delete(zero)
mc.makeIdentity(each, apply=True, t=True, n=False)
pcon = mc.parentConstraint(loc, each, mo=False)
mc.delete(pcon)
mc.delete(loc)
zeroOut()