In my first camper you could close the tailgate so as other have said you would be trapped for EVER! ( grin)
However as well others have said there is an escape window or hatch on the roof on campers now and back then.
Also in BC you can't travel in the back of a camper or anywhere else that doesn't have a seat belt.
However..... if your worried about someone closing the tailgate while your inside sleeping etc....
I would just put a pad lock one the arms that hold the tailgate from dropping to far when open. The only thing the padlock will do is make noise / get in the way, someone try's to close the tailgate. Now they could probably see the lock during the day, but during daylight hours there will probably be other people around as well. However at night the culprits wouldn't see the lock and it would make a sound as it hit the truck as they try to close it. Now I never tried this and just thought of it with my morning coffee, so there maybe other ideas out there if your worried about it.
Soup.