Gray water discharge

Is this a good idea? its not a sump crock its just a well collecting gray water from the wash basin then discharging it up to the drain which appears to be connected correctly, with the loop on top. The sump pump is at another location in the basement. The only thing that I don’t like is the fact that one day the pump will go out and water could be all over the floor if using the wash basin,( soaking clothes with a large tube of water then opening the drain plug and walking away). Should I recommend this be contained like a Sewage Ejector Pump would be? Or it is what it is. This is actually where I live, we are renting and I am not sure what to say in the report if anything. So you can see my concerns both ways. The only info I have found is that it is not common practice to use a sump hole to eject gray water like from a wash machine or sewage water. Thanks!

Where is the sump pump discharging? Into the city sewer?

The sump pump is discharging through the wall to the out side of the home above ground. It never turns on because we have sandy soil in this area.

If found on an inspection I would advise client of the potential for the senerio you have described with a overflow. A sealed container woul be best resolution (called laundry tray pump in my area). Would also recommend a cover for the pit as it is a tripping hazard without a cover.
Also from the photo although probably an optical illusion it appears that they tee wye fitting is turned the wrong way (wye toward upslope of pipe)?
Additionally I would recommend that the sump pump discharge point is directed away from the foundation wall. While inspecting we can’t know how often water is ejected from the pit. So it’s best to recommend that it be directed away from the foundation wall.
Also what’s the piece of PVC running across the top of the pit and the wire running across the floor? It looks like the power cord for the pump runs up the discharge pipe?

Soapy water is actually fine to discharge outside right on the ground but most plumbing inspectors don’t see it that way.

The wye is correct in that the flow does go right of the picture to a stack picking up the bathroom then down, and then back across to the left of the picture exiting through the wall. The left of the picture above is coming from the kitchen on the first floor. The PVC (LOL) is the support for the pump so it does not fall in the hole. The black hose across the floor is the drain tube for the dehumidifier next to the hole. And yes that is a cord from the pump running up the discharge pipe and plugged into the receptacle, Which is unprotected from a GFCI which I believe is ok in that if the GFCI tripped the pump would not discharge? Thanks !

The GFCI on the sump pump is a tricky one. As we know according to current standards of practice all outlets in potentially wet locations i.e. unfinished basements, should be GFCI protected. As you correctly stated though if the GFCI trips the pump won’t work = potential for flooding. I always tell clients of the current standard. Also inform them that if/when a GFCI is installed a high water alarm should also be installed in the pit to avoid flooding from unforeseen GFCI trips. I always want to give all the info and make sure I’m covering myself as best as possible.