This is exactly perfect the way you wrote it.
There are three things to keep in mind:
1. All musicians like to read accidentals that clarify when the notes all belong to the same scale or harmony. Even if that scale changes from measure to measure. So what you've done is perfect. If you for instance, spelled measure 33 with Ab and E natural, respelling a straightforward major 3rd as a strange diminished 4th, this would definitely confuse the musicians more and is a bad idea.
2. Strings (and I believe all musicians?) like reading accidentals that go "in the direction of travel." So a rising line should favor sharps, and a descending line flats. BUT! this should NOT trump the previous rule that if a passage belongs to a particular key, spell it with that key's notes. So the rising scale at the beginning of your passage is correct to spell with flats.
3. In general strings like reading sharps a bit more than flats. And this is the weakest rule of all and should not trump rules 1 and 2.