... "next" to the prisoners rather than "with".
The prisoners there were political prisoners. It would be interesting to know what the church had done for and against them.
A translation, if i may...
In the memory of the Sisters of St-Paul de Chartres
at the service of the Lord (church)
through being there with the prisoners...