Are you ever really "out of the woods"?

Annelise • Mom of 5
So I know in the first trimester is when you are most likely to lose the baby. I'm 11 weeks an heard the heart beat at 10 weeks. With just one more week to go I am so nervous about that next appt. but I am curious how likely is it to miscarry in the 2nd trimester? I saw some ladies say they miscarried at 17weeks. Just wondering what would be causes of miscarrying so far in to the pregnancy?