I have read "I swan" in stories about country life, but it did not seem to be a euphemism
for a forbidden word. More often it seemed to be an expression of mild surprise.
From radio program "Lum and Abner"
September 24, 1935:
Abner: That reminds me, too, Lum, you know I told you 'bout that vanella extract's been disappearin' down at the store. I
found out where it's been goin' to. Cedric's been gettin' it. He's usin' it for pre-fume!
Lum: Vanilla extract fer perfumery?
Abner: Yes, sir! Every time we get on that store I get hongry. Smells like somebody's bakin' a cake in there.
Lum: Hmph! I swan to goodness. That boy is a sight.
Abner: No tellin' how much of that stuff he's usin'. Just pours it all over hisself. Got the whole store to smellin' like vaneller. We
oughta just stop handlin' that vanella flavorin'.
Lum: Well, you better speak to him before he starts in on the bananer or lemon or some of them other flavorin's.