Hello Indy;
I’ve tried to come up with an expression, but I’m not sure it will help.
This expression assumes that all lines have the same leading, and that the anchorPoint is currently set to [0,0] (and text is centered of course).
Apply this expression to the anchorPoint of the text-layer:
leading=50; // this value cannot be retrieved using expressions! Set it manually
linefeedch = "r" // if it doesn't work try changing this to "n", works on mac maybe not on win
theText=thisLayer.text.sourceText.value
numlines=theText.split(linefeedch).length -1;
anchorPoint + (leading * [0, (numlines/2) -0.2]) // the 0.2 value depends on your Font & typesize
[0,0] is actually the baseline, so the -0.2 is used to center the anchorPoint for a 1-line text,
but you may need to change it depending on the design of your font and the ratio between leading and fontsize
hope that helps.