This is a pretty misleading presentation of the data, IMO. Debt is to a high degree a function of wealth. The more wealth, the more debt capacity there is without compromising the asset base and/or cash-flow.
Looking at the second half of the chart is instructive. S&P 500 has ~tripled since 2010. During the same time frame margin debt is up 2.5x or so. Not so alarming when viewed in this manner.
This general relationship is still true, but less in sync over the entire span. However shifting start date a year or two either direction would likely bring it back in sync as a wealth dynamic. Admittedly, at first blush I thought 1997 was a cherry picked start date, but from quick search it appears that is the start of this information being tracked/published.
The longer the time span, and greater the wealth growth, the greater divergence I would expect to see. However, on a % basis, it doesn't appear to be adding incremental risk to me.
Of course margin balances are compressed in recessions along with index/asset values. But, as markets grow higher over time, the likelihood of correcting all the way back to a "touch point" in the data is increasingly less likely... as long as debt growth rates aren't outpacing asset/wealth growth rates.