You could probably design a drain into a pipe that empties away from any of the important components under the cab, but you'd either need a really long, flexible (complicated) sewer hose (which would likely be prone to freezing in places that got cold enough) or just dump into the shaft like old railroad toilets used to do...but that'd be atrociously disgusting and likely a public health no-no.
If the premise is that liquids are just randomly seeping into the elevator car machinery under the floor because this is somehow not thought about, presumably they're already dripping into the shaft after taking a trip through the gears/whatever else - the mechanical underside of the car is certainly not better sealed off than the interior cabin is.
If I'm in the elevator with some groceries and drop 2 gallons of milk, what happens? The answer can't (or shouldn't) be that a whole bunch of electronics/wiring/machinery gets coated in milk under the car and potentially causes major damage.
I can't imagine that I'm the first one to think of this question, so clearly something's being missed here.