Adding a text that has a couple of pixel white borders is something possible in GIMP, yet a nightmare compared with photopea which just copy cs2 way of doing it.
And that is without having to edit the text in case you made a tipo.
Now, if we are talking about doing batch image editing in python. Gimp us the best tool I've found.