Defect-based quantum systems in in wide bandgap semiconductors are strong candidates for scalable quantum-information technologies. However, these systems are often complicated by charge-state instabilities and interference by phonons, which can diminish spin-initialization fidelities and limit room-temperature operation. Here, we identify a pathway around these drawbacks by showing that an engineered quantum well can stabilize the charge state of a qubit. Using density-functional theory and experimental synchrotron x-ray diffraction studies, we construct a model for previously unattributed point defect centers in silicon carbide (SiC) as a near-stacking fault axial divacancy and show how this model explains these defects robustness against photoionization and room temperature stability. These results provide a materials-based solution to the optical instability of color centers in semiconductors, paving the way for the development of robust single-photon sources and spin qubits.