All of the above are maybe, or even likely, true. An insurer will declare a "total loss" if the cost or repairs + the salvage value (what a scrap yard would pay for it) exceeds the ACV (fair market value of the vehicle before the damage). The owner gets a check for the ACV and the coach is then sold by the insurer for it's salvage value. In many states, the title that goes with that coach is marked "Salvage" or similar wording to denote that the vehicle has been scrapped.
Whether that "scrap" is badly & permanently damaged is not always clear. Often the cost of repair is high because of the huge amounts of labor needed and professional shop labor is expensive (think in terms of $100/hour). Individuals with the skills, or shops that have spare capacity, may buy the "salvage" and work on it as time permits, and it is often possible to completely restore the coach. My Dad owned an auto body shop and always got his own cars that way, buying a "totaled" high end car from the insurer and fixing it in his spare time. He would drive it until another nice one came along and then sell it.
On the flip side, somebody could buy the same salvage and do a quick & dirty repair that leaves hidden parts partially repaired or maybe even unrepaired. That's the risk, and the reason that most states mark the titles as a warning.
So, a vehicle with a salvage title may not always be a bad one, but the buyer needs the skills to discern whether the repairs were complete and safe, or whether some shyster just did quick & dirty cosmetics. If you can't do that, or hire an inspector who can, probably best to avoid such vehicles.