The aim of this paper is to develop a stability theory and a numerical model for three density-stratified electrically conductive liquid layers. Using regular perturbation methods to reduce the full three-dimensional problem to the shallow layer model, the coupled wave and electric current equations are derived. The problem set-up allows for weakly nonlinear velocity field action and an arbitrary vertical magnetic field. Further linearisation of the coupled equations is used for the linear stability analysis in the case of a uniform vertical magnetic field. New analytical stability criteria accounting for the viscous damping are derived for particular cases of practical interest and compared to the numerical solutions for a variety of materials used in batteries. These new criteria are equally applicable to the aluminium electrolysis cell magnetohydrodynamic (MHD) stability estimates.