>>2028537This has been done several times. The Honda GN01 is the most modern example of a derailer in a sealed case, but still runs a chain externally to the rear wheel. The difficulty with this idea is that there's a limit to how large a chaincase can be without interfering with the rider's legs or spacing the cranks too far apart for efficient pedaling.