It also helps that the wire is very small, generally, in relation to the insulation - the apparent effectiveness of the insulator drops off as you go out.
Considering the simple case of a 1cm diameter cable in the middle of an infinite fiberglass insulator. Imagine the insulator split into millimeter thick cylinders. The first millimeter of the insulation has a perimeter of 32mm or so. The 50th mm has a perimeter of about 340mm.
So, the 50th millimeter adds 1/10th as much as the first one.
As an example, with fiberglass, 0.04W/m/K, that's 40w/mm/k for a 1mm thick 1m square sheet.
Or about 1.5w/m/k for 1m of flex insulated with 1mm of fiberglass.
10mm gets you about .21w/m/k, 50mm about .1, and 100mm 0.08.A whole meter only about halves this.
1mm^2 cable has a resistance of 1.7*10^-2 ohms (.017 ohms). 2.5mm^2 cable, for both directions has about .013 ohms per meter.Taking 30A through this dissipates 12W or so, or allows at most 10mm of insulation or so (temp rise of 60C ish).
Derating to half gives a power per meter of 3W. With 10mm, a rise of 14C, even 100mm is quite safe, with a rise of only
40C. You have to get pretty near a meter of insulation on each side of the wire, to get close to being dangerous.A simple metal heat spreader, next to the wire, even if it's buried in insulation can help lots. Actually, it doesn't even need to be metal, it just needs to be a comparatively poor insulator. Timber helps lots.
(If you use this as the basis for running cables through insulation, and your house catches on fire, I reserve the right to point and laugh)