It's not exactly solved - your examples are close but not equivalent.
Hotels have many people who work there and cleaners who enter the room daily (no Hendrix hotel a la Altered Carbon yet). Rental cars are secured with your credit card so there's a massive disincentive to trash the vehicle.
Perhaps pervasive recording of the vehicle interior would suffice.
It’s also been solved (or isn’t a problem) with car share apps like Car2Go or Zipcar.
Those cars don’t get cleaned between rides, but system asks how clean the car is when you start a trip.