  We employ ab initio modeling to investigate the possibility of attaining
high-temperature conventional superconductivity in ambient-pressure materials
based on the known MgB$_2$C$_2$ and recently proposed thermodynamically stable
NaBC ternary compounds. The constructed $(T,P_M)$ phase diagrams (M = Mg or Na)
indicate that these layered metal borocarbides can be hole-doped via thermal
deintercalation that has been successfully used in previous experiments to
produce Li$_y$BC ($y=1>x\gtrsim0.5$) samples. The relatively low temperature
threshold required to trigger NaBC desodiation may help prevent the formation
of defects shown recently to be detrimental to the electron-phonon coupling in
the delithiated LiBC analog. According to our numerical solutions of the
anisotropic full-bandwidth Migdal-Eliashberg equations, the proposed
Mg$_x$B$_2$C$_2$ and Na$_x$BC materials exhibit superconducting critical
temperatures between 43 K and 84 K. At the same time, we demonstrate that
buckling of defect-free honeycomb BC layers, favored in heavily-doped Na$_x$BC
compounds, can substantially reduce or effectively suppress the materials'
potential for MgB$_2$-type superconductivity.
