The part with Berufsunfähigkeit (disability to work) is the important one. In order to qualify for an immediate pension payout once you’re unable to work due to sudden disability you need to have contributed 5 years, including at least 36 monthly payments made in the last 5 years. Note that depending on the points you’ve accumulated due to past income the pension may be significantly more than Hartz IV level, and therefore worthwhile.
If you’re switching to a (voluntary) non-income situation after having worked for a few years it’s therefore not a bad idea to remain arbeitslos ohne Leistungsbezug for the first two years after e.g. your ALG1 payout runs out (ALG1 contributes to pension insurance). The other option working to the same effect in the same situation is if you retain a token minijob and you reject dismissing your pension payments, leading to a default contribution of a few Euro each month that keeps up your pension qualification.