This is a huge maintenance issue as it is required to seal the wiring from the controls for gas migration. One of the simplest ways is to install a JB in the well above the upper water line Use cab tyre connectors from the float to the JB and install the EYS for normal wiring at the hazardous boundry to a terminal strip in the JB.
you may need to use more than 1 JB as intrinsically safe wiring cannot run in the same raceway as the pump motor leads as just 1 example.

For small sumps where the motor lead and the pill switch leads are sealed from the switch or motor and it is next to impossible for gasses to enter the cable, the sump we have accepted the raceway get cut off say 1 inch from the floor and create an air gap above the 2" limit of the hazardous location and use duct seal there to prevent gas migration up the raceway that is only providing mechanical protection or a path from the sump to the outside. Some sumps are not hazardous until there are 6 or 7 units that spill into the sump. Some sumps are for sewage and some for surface water. there has to be several occupancies attached to a sewage pump before it is considered to be hazardous but the equipment is identical regardless, so often people assume all sumps are hazardous locations. Some are and some are not even though they may both use the same equipment.