You are reaching the limits of what you can do with plotly itself.
As you've already figured, WebGL handles large amounts of data better than the SVG renderer. The performance will start degrading around 1 million datapoints.
I am not sure what the bottleneck is from there, but would guess it is the JavaScript overhead or maxing out the memory the browser can allocate to a tab. But this is the general challenge when working with bigger data sets. You'll need some form of resampling or on-demand loading.
If you cannot subsample, you'll need to look into other frameworks since native plotly does not support on-demand loading by itself.