Final results are presented from the inclusive measurement of deep-inelastic polarised-muon scattering on longitudinally polarised deuterons using a $^6$LiD target. The data were taken at $160~{rm GeV}$ beam energy and the results are shown for the kinematic range $1~({rm GeV}/c)^2 < Q^2 < 100~({rm GeV}/c)^2$ in photon virtuality, $0.004<x<0.7$ in the Bjorken scaling variable and $W > 4~{rm GeV}/c^2$ in the mass of the hadronic final state. The deuteron double-spin asymmetry $A_1^{rm d}$ and the deuteron longitudinal-spin structure function $g_1^{rm d}$ are presented in bins of $x$ and $Q^2$. Towards lowest accessible values of $x$, $g_1^{rm d}$ decreases and becomes consistent with zero within uncertainties. The presented final $g_1^{rm d}$ values together with the recently published final $g_1^{rm p}$ values of COMPASS are used to again evaluate the Bjorken sum rule and perform the QCD fit to the $g_1$ world data at next-to-leading order of the strong coupling constant. In both cases, changes in central values of the resulting numbers are well within statistical uncertainties. The flavour-singlet axial charge $a_0$, {which is identified in the $overline{rm MS}$ renormalisation scheme with the total contribution of quark helicities to the nucleon spin}, is extracted from only the COMPASS deuteron data with negligible extrapolation uncertainty: $a_0 (Q^2 = 3~({rm GeV}/c)^2) = 0.32 pm 0.02_{rm stat} pm0.04_{rm syst} pm 0.05_{rm evol}$. Together with the recent results on the proton spin structure function $g_1^{rm p}$, the results on $g_1^{rm d}$ constitute the COMPASS legacy on the measurements of $g_1$ through inclusive spin-dependent deep inelastic scattering.