At least your lesson doesn't involve completely rebuilding it.
I bough our first pop-up not knowing the first thing about trailers. It was used, had a broken lift in one corner, and was musty inside. No mold that I could see though. I ended up rebuilding the floor in both front corners, new curtains, new cushions, and a host of other things. The good part was that I sold a year later for more than I paid for it.
I learned a lot with that trailer.
2013 Jayco Jayfeather X20 E (sold)
2016 Chevy Silverado LTZ 2 Z71 Crew Cab (sold, and dearly missed)