You cannot 'associate' text with geometry at its insertion point, through the API.
It has long been asked for...
There are a couple of workarounds...
Make it as 'flat' 3d-text [or normal Text] - make it inside a component definition, which has is2d gluing behavior, add_instance of it at the face.bounds.center point, then use instance.glued_to=face so it moves with the face...