I remember this as folklore - does this occur in any scripture?
Does Kunti pray to Krishna to always give her troubles so that she would always remember him?
Yes, Kunti said similar thing according to Srimad Bhagavatam.
विषान्महाग्नेः पुरुषाददर्शनादसत्सभाया वनवासकृच्छ्रतः
मृधे मृधेऽनेकमहारथास्त्रतो द्रौण्यस्त्रतश्चास्म हरेऽभिरक्षिताः ॥ (1.8.24)
Meaning: My dear Kṛṣṇa, Your Lordship has protected us from a poisoned cake, from a great fire, from cannibals, from the vicious assembly, from sufferings during our exile in the forest and from the battle where great generals fought. And now You have saved us from the weapon of Aśvatthāmā.
विपदः सन्तु ताः शश्वत्तत्र तत्र जगद्गुरो
भवतो दर्शनं यत्स्यादपुनर्भवदर्शनम् ॥ (1.8.25)
Meaning: I wish that all those calamities would happen again and again so that we could see You again and again, for seeing You means that we will no longer see repeated births and deaths.