The project you envision is not for the faint of heart.
Your 8 year old camper has developed the equivalent of cancer and how you open her up will determine your course of action.
1) Do a "minimal" exploration/repair. Remove the window completely and examine the damage to the wall. If the wall around the window need replacement, it will totally depend on the wall construction in the 2004 as to whether repair is even possible.
If it is not damaged too badly (remember the walls are a critical part of the structure and need to keep everything together when you travel), repair the damage where the window bolts through; reseal around the trim with ProFlex sealant and reinstall.
Lots of time closed up with a good quality dehumidifier ported to the outside to try and dry it out thoroughly. Hopefully the sponginess will (mostly) go away after the plywood and particleboard dries out. There is no guarantee after the investment of time and money you will still be able to save it.
2) A full restoration. Not worth it unless you are totally in love with THIS camper and money is no object.
3) In my opinion, at this point an 8 year old camper with severe water damage is ready to become a hunting cabin in the back woods. It should be sold while it is at least "road-able" and be honest when you advertise it as a "hunting cabin." There is a market for them and any money you get can be put towards a new camper.
Lou and Laura with Bella - German Short Hair Pointer
2008 GMC Sierra 2500HD Crewcab SB Allison Duramax
2010 Flagstaff 8526RLWS - Superglide 3300
HAM CALLSIGN - KC3FFW