Right phonetic
危 supplies the sound (wēi → guì, a heavy drift but historically related).
危 itself pictures a person on a cliff edge — precarious. The semantic flavour fits beautifully: kneeling places your weight on a tiny, unstable surface. Same phonetic appears in
诡 (deceitful) and
脆 (brittle).