Dear @Ratzel,
Welcome to the Wefugees Community and thank you for your question.
First of all, I am sorry to hear about your difficulties and I hope that you will still be able to manage your troubles.
In any case, a "Niederlassungserlaubnis" is a permanent residence permit and it won't be affected by a divorce. So you would not need to worry about this aspect.
Even with a (non-permanent) residence permit as spouse of a German (or foreigner with a residence permit), people may apply for an independent residence permit (in case of a divorce, for instance) - one requirement is that you (usually) must have been married in Germany for at least three years.
I hope this helps and please don't hesitate to get back to us with any further questions.
All the best,
Meike