Mitigating Device-Level Vulnerabilities in Post-CMOS Machine Learning Accelerators