Hi there,
Yes sure. Can do your taskp, using Python + Tesseract + ImageMagick. Tesseract will be used to find current text location. ImageMagick to write new text in solid color rectangle. Python to run the script on batch of images. Will be deliver standalone CLI tool for your task. OpenCV can't do what you need, as the other guy said, hence will waste your time. I could be the best candidate! And Python is perfect language for your task!
I'll respond within one hour, if you find me offline (daytime).
Best regards,
Ishaq