I did it in a Casita
and it did OK. I am going to install laminate in a Scamp
16 over the carpet. The good thing is if you dont like it you can just unlock the laminate, and reinstall it over the thinner padding if needed. If you decide to take out the carpet the foam backing wants to stay glued to the floor. They make a straight edge scraper blade with no teeth for a multi-tool that works pretty good for getting up the old foam if you decide to pull out the carpet.
If there has been pets in the trailer or the carpet is really dirty I would remove the carpet. If the carpet is clean you should be OK.