iPhone 3GS keeps rebooting, brand new, never jailbroken
I bought an iPhone 3GS in 2010. Worked perfectly until iOS 5.1, then it started rebooting whenever the SIM-card was in, but worked fine as a iPod Touch whenever the SIM was removed. Also, it needed to be restored after each reboot because iTunes couldn't identify it. I took it to the Apple store (on 5th Ave, if that's any relevant information). The Genius told me it had nothing to do with the software. The phone was broken. He did not specify what exactly was broken, but he offered me a replacement for about 160 USD (that's including tax). I accepted and was happy for my new phone until the same problem occured after just four days of getting the new phone. I'd take it to the store again, but the problem is - I don't actually live in New York. Currently living in Denmark. Brought it to my service provider, and they told me the phone was broken. Called Apple but they couldn't help me, since it was out of warranty.
TLDR
Had an iPhone 3GS, kept rebooting and had to be restored when SIM-card active. Got it replaced to the exact same model (iPhone 3GS 32 GB), same exact problem. Neither Apple or service provider will help me.
Neither phones had ever been jailbroken or used by anyone else.
iPhone 3GS, iOS 5.0.1