The glock mechanism of safeties is (statistically) rather safe though being simple enough:
https://crimefictionbook.com/2016/02/04/do-glocks-have-safet...
But (as I learned only recently) there are guns around with actually no "proper" safety and one model at least is particularly prone to fire accidentally:
https://www.thetrace.org/2023/04/sig-sauer-p320-upgrade-safe...