I taught to trim anytime the a/c was out of trim, except if a deliberate untrimmed state was desirable eg turns or, for some types/pilot combinations, a slight nose up trim on short final.
I know I trim within seconds of the wheels leaving the ground if it's not correct. I also do so on approach up to the point where I commence the flare, if necessary eg flying a reducing speed profile. As far as I can see, altitude is irrelevent. The major factors are task priority & pilot capacity to attend.