The solution is to not use a pronoun (“her”) in cases where it can’t be made clear who or what the antecedent is of that pronoun. In this case, there are two women mentioned in the sentence (not counting the first person narrator), so best to avoid “her” entirely.
You of course know this but for others reading: split infinitives are a feature of the English language, not a grammatical error! In this case it lets you cleanly state the solution is “to not use…”
Forcing the construction “not to use”, in contrast, ends up creating a garden-path sentence as the reader awaits what the solution actually IS (anticipating “the solution is not to use… but rather…”)
Split infinitives get a bad rap because they have no equivalent in Latin, and 19th century grammarians got fussy about things like that. Use them freely!
And yeah I split the infinitive above on purpose