[AT&T Samsung Galaxy S 4 General] lingowistico:
Didn't help, but I did write up a small analysis of this thread (read next paragraph).

So, I've tried the trick twice. Once with the recommended thickness and once with double of that.

Each time it worked for a couple of seconds after boot but as soon as I picked up the phone from the table the error appeared.

I've ordered two sim tray replacements and will try them, all though I do not expect it to help.

Once the replacements arrive (2-4 weeks) I'll try other materials instead of foam (I'm in no hurry with this phone).

Then, if none of that helps, I'll try cooking (baking) the motherboard in the oven.

While reading through this thread, and the thread over at gsmhosting, I've come to the conclusion that the design of the motherboard makes this (and other issues) prone to happen. Maybe Samsung went all the way, in ripping off Apple with this phone, and incorporated planned obsolescence?

Because of the layout of the components and their proximity to the CPU. Once the CPU is hot enough it starts to heat nearby components (which is most of them lol).

And when they're hot enough they are prone to become loose or the lead that keeps them in place: a) melts and leaves components exposed and partially disconnected or b) becomes prone to cracking leaving the affected components, again, partially disconnected.

For a lot of people the solution proposed in OP seems to have worked. A few people are saying that soft materials like foam lose their pressure power over time and recommend using harder materials like credit card type plastic.

Others say that a complete reheat/reflow worked. Others report heating only a chip, or two, did the trick. Some reported replacing the sim & sdcard tray solved the issue while others still report that replacing the tray didn't help.

A lot of people, no matter the method, report that the problem usually returns, wether it takes a week, two weeks or several months.

Other proposed solutions include turning on NFC, switching to WCDMA/3G (thus losing LTE/4G).

Here are some earplug foam success stories, I might've missed some.

There are just as many reports of failure, or reports of the fix being temporary (usually lasts for at least a week), but I'm too lazy to go through the thread again and list all the failures too :P

http://xdaforums.com/showpost.php?p=61969122&postcount=18

http://xdaforums.com/showpost.php?p=62485011&postcount=19

http://xdaforums.com/showpost.php?p=62557789&postcount=20

http://xdaforums.com/showpost.php?p=62692744&postcount=21

http://xdaforums.com/showpost.php?p=62708271&postcount=22

http://xdaforums.com/showpost.php?p=63130756&postcount=23

http://xdaforums.com/showpost.php?p=64007633&postcount=47

http://xdaforums.com/showpost.php?p=64072444&postcount=48

http://xdaforums.com/showpost.php?p=64082621&postcount=49

http://xdaforums.com/showpost.php?p=64116086&postcount=51

http://xdaforums.com/showpost.php?p=64233668&postcount=57

http://xdaforums.com/showpost.php?p=64842677&postcount=62

http://xdaforums.com/showpost.php?p=65083142&postcount=67

http://xdaforums.com/showpost.php?p=65288572&postcount=78

http://xdaforums.com/showpost.php?p=65494267&postcount=85

http://xdaforums.com/showpost.php?p=65517013&postcount=87

http://xdaforums.com/showpost.php?p=65585034&postcount=93

http://xdaforums.com/showpost.php?p=65851820&postcount=104

http://xdaforums.com/showpost.php?p=66018116&postcount=109

http://xdaforums.com/showpost.php?p=66350710&postcount=127

http://xdaforums.com/showpost.php?p=66614117&postcount=143

http://xdaforums.com/showpost.php?p=68796498&postcount=169