Is there a recommended amount of attenuation for rectifying edge artefacts?
My guess is that for Spotify, it is not just about avoiding clicks, but also to improve the DJing kind of experience. The fade length seems to be a user setting in Spotify. Based on my testing with 20 Hz and 440 Hz test tones and Virtual Audio Cable, YouTube doesn't fade in or out or do any other kind of click removal when pausing, here with 20 Hz test tone:

The worst-case test signal to be faded in or out would be a full-scale constant-valued signal (for 16-bit audio that would be 32767, 32767, 32767, 32767, 32767, 32767, ...), because it has no audible sound of its own, and because it will still allow to hear the fade as loud as possible. Then we'd need the best possible fade shape, but I don't know what it is, so here is a sub-optimal fade in:
$$f(x) = \begin{cases}0&amp;\text{if } x &lt; 0,\\
\frac{1}{2}-\frac{1}{2}\cos(\pi x)&amp;\text{if } 0 \le x \le 1,\\
1&amp;\text{if } x &gt; 1.\end{cases}\tag{1}$$

The following &quot;floatbeat&quot; program plays this fade twice a second (once in and once out per second):
f = function(x){return 0.5-0.5*cos(x*PI)}, fadeLength=0.03, loopLength=1, sampleRate=44100, p=(t/sampleRate)%loopLength, q=p-loopLength/2, (p &lt; fadeLength? f(p/fadeLength): (q &lt; 0)? 1: (q &lt; fadeLength? 1-f(q/fadeLength): 0))

Try running it and adjust fadeLength. At least for me, using good headphones at normal music listening volume, a fade length 0.03 s is only barely audible as a thump, and increasing it to 0.04 s makes the thump disappear. I think 0.03 s is pretty safe.
But is 0.03 s already so long that it sounds like a fade? Let's apply the fades to a 400 Hz sine tone, in floatbeat:
f = function(x){return 0.5-0.5*cos(x*PI)}, fadeLength=0.03, loopLength=1, freq=400, sampleRate=44100, p=(t/sampleRate)%loopLength, q=p-loopLength/2, (p &lt; fadeLength? f(p/fadeLength): (q &lt; 0)? 1: (q &lt; fadeLength? 1-f(q/fadeLength): 0))*sin(2*PI*t*freq/sampleRate)

Running this, I can't hear a click in fade in or fade out. I know there is a fade from the way it sounds and because I do a lot of music editing, but it does not register as a gradual process, more like a smooth event.
Let's try some other fade shapes of length 0.03 s too, with my comments comparing each to Eq. 1:

Repeating Eq. 1 here for easy clicking.
A linear fade $f(x) = x$ sounds much clickier to me.
Smoothstep $f(x) = 3x^2-2x^3$ sounds maybe tiny bit worse to me.
Asymmetrical polynpomial $f(x) = 6x^2 - 8x^3  + 3x^4$ sounds significantly thumpier.
Smoothstep $f(x) = 10x^3-15x^4+6x^5$ sounds about as good, maybe even a bit better. Less mid-freq but more bassy thump.

Calculating the Fourier transform $F(f)$, where $f$ denotes frequency, of each fade of length 0.03 s appears to confirm what I heard: (For this, I calculated the Fourier transform of the derivative of each fade as function of time $t = \frac{x}{0.03s}$, and compensated for derivation by multiplying the result by a factor $-\frac{i}{f}$.)

I also included the pure tone hearing threshold curve from ISO 226:2003. Some caveats: I do not know the listening volume level so I just shifted the curve in dB scale until it matched my subjective hearing experience with the fade curves peaking above the threshold at roughly those frequencies at which I heard them. Also, the threshold curve has been measured for pure sinusoidal tones whereas here we are dealing with transient sounds. The level comparison between the two cannot be well defined. It would be better to do the analysis with something like a compressive gamma-chirp filter bank which better models hearing. I used closed-back headphones, but still my listening environment has some fan noise and such, so not perfect silence, so there could be some auditory masking going on. Despite all the caveats, I think the threshold curve is useful to show here as it seems to match what I heard. It also hints to that there may be a better fade shape that moves some of the energy from the first spectral side lobe to the main lobe, using window function terminology. Perhaps a better fade shape, one that barely touches the hearing threshold at multiple early lobes, could be obtained by integrating a suitably parameterized Ultraspherical window. Or perhaps there are ways to trace the hearing threshold for all lobes.
I'd choose between 5th order smoothstep and Eq. 1, or 3rd order smoothstep if you want to save some processing power. The choice is not too critical.