Good reminder! About two years ago, I realized the importance of this as we're likely to access the funds before 59.5. I made a big project of organizing my documentation. Amazingly, I'd kept a bunch of paper (but not all) dating to 1996 including a Roth conversion done in 1998 or 99. Stray bits of paper substantiated nearly every contribution.
Honestly, I recall being confused what the 5498's were for because my returns never needed the data. And I did lose a few but I kept enough to put it all together.
Now, of course, it's all digital (and backed up and encrypted) consisting of a spreadsheet with a sheet for each account (they've moved and converted many times) that tracks each deposit, opening, closing, transfer, etc with each element referencing a supporting document.
21 years, probably 15 IRA accounts of all sorts fully documented.
Only bummer in the effort was rvisiting what a dufus I was with investing choices up to maybe 2004.
Relatedly, I did similar documentation of our HSA which is invested and which we're deferring withdrawals of qualified expenses. That documentation is far more voluminous and painful to maintain!