This is actually extremely challenging to get right. There several reasons.
One pivot is governed by not only the pivot but also the 2 pivot offset values, these need to also be handled unless your specific case is insane. This one cases the effect:
so if I move the curve;polyCubes goes weird places.
Because the rotation data no longer means the same thing, the datas computed form the pivot if you move teh pivot you move teh object. You would need to compensate by moving the rotate pivot offeset too. However the rotate pivot is a integral of the move path and its not easily possible to handle very well in a open keying context (you can do this but it gets really restrictive or computationally demanding).
Second problem is mayas evaluation order, see the pivot can not be part of your objects history it must be below it or preceding sibling. So this causes the ting to convolute even further.
Can it be done? In some instances yes quite easily. In general? I have no idea how to approach this so that it would account for all of it without evaluating data form previous known good frame.
Good luck.