So now that there are several approaches suggested but none accepted as a Solution, clarify some things for us....
Some of them look for only Mtext [supported by your original description], and some for both Text and Mtext. Might the text objects sometimes be plain Text? If so, the (assoc 10) code some extract for the insertion point may not be the right thing to position it by, depending on the justification [good for Left justification -- otherwise you want (assoc 11)].
Whether Text or Mtext, are they always of the same justification? Which one? If always Middle or Middle Center, positioning by the insertion should do what you want, but otherwise the middle-of-bounding-box approach would be better.
Some of them ask the User to select things, and some look for things from the whole drawing. What is your anticipated User procedure?
Some look for only closed Polylines, but some allow open ones. And some restrict them to 4 vertices only, but some allow any number. If they're really always and only closed 4-vertex rectangular ones, it's not necessary to either average all their vertex locations or convert them to VLA objects to get their bounding boxes -- you could simply find the midpoint between their first and third [or second and fourth] vertices.
Some specificity about the possible detailed circumstances, and about what you intend as the steps the User would take, would be helpful.
Kent Cooper, AIA