I don't know why you're using the rectangle's origin (in the rectangle's local co-ordinate system) for the text's origin (in the text's local co-ordinate system).
If you want the origin to be the centre for both, set that origin based on each object size (and position offset for text). Then, once the origins are correctly set, you can set both of their positions to the same position and they would both have their centres in the same place (they would be aligned to their centres).
For texts, use the local bounds to calculate where the local origin should be. Remember that not just the size (width and height) but the offset (left and top) should be taken into account.
To set the origin of a text to its centre:// "text" is the text object
const sf::FloatRect textLocalBounds{ text.getLocalBounds() };
text.setOrigin({ (localBounds.left + localBounds.width) / 2.f, (localBounds.top + localBounds.height) / 2.f });
Important note: this code should be executed whenever (and after) the text string is changed and it's based on the actual text string.
(or simply executed every loop - before it is drawn)