For context: This is the last sentence in a small story about a man who has 2 boys in his neighbourhood which look very smilar to each other. He now tells us about the consequences of this:
でも、二人は顔も髪型もそっくりなので、いまでもうっかり太郎君を次郎君と呼んだり、次郎君を太郎君と呼んだりしてしまいそうになる。
First, my translation:
However, because the two, Tarou and Jirou, completely look alike, even now I become regrettably calling Tarou Jirou and Jirou Tarou.
I would usually interpret this X (Verb, adj etc.) そうに V like
楽しそうに遊びます。
"Someone plays happily"
However, なる after そうに seems to make this way of interpretation impossible. "someone happily becomes" still makes some sense, although the object of this "to become" seems to be missing.
Also, if I follow the grammatical explanations from my textbook, this "...そうに Verb " further determines the verb following そうに. I think I already encountered such a case with そうになる in the past and it still confuses me a lot. Especially in the case in question, I just can't muster the understanding how this "I regrettably interchange their names" can further determine the process "to become". It feels overly complicated to me which is why I fear that I misunderstood something. Even more so because the translation I did above feels like it doesn't even reflect this concept: "to become regrettably doing X" doesn't seem to further determine "to become". "to regrettably doing X become" would reflect it, but it is ungrammatical. So I can't even think of a grammatical translation reflecting the concept I'm assuming we have here Oo ^^