Someone has probably already written fanfic about it. There's an awful lot of Doctor/Companion stories on
A Teaspoon and an Open Mind (website for Doctor Who fanfic). Some of it was... kinda NSFW. I hadn't really imagined the Fifth Doctor and Tegan like that, or the Fourth Doctor and Romana II...
View attachment 21504
The closest example we had to romantic feelings between Doctor and Companion (to my knowledge, since I never watched Capaldi's last season or any of Whittaker's era) is the Tenth Doctor and Rose (I don't really consider River Song a companion; she just kept turning up).
So if a female Doctor were able to meet up with Rose again, would the relationship work?
I have no idea. Either it will or it won't.
Besides, the Doctor usually references past incarnations in the aftermath of a regeneration, before everything settles down and the new personality kicks in. I suppose if (s)he and the companion had been in a relationship right before the regeneration, it might be a dealbreaker if the Doctor couldn't handle the change.