Washer drain and main plumbing drain

This picture is in the basement of an old house. The main drain line is about 4 feet from the ground and runs out of the back of the house. Currently the clothes washer is above this room and the washer drain is the pipe that connects into the main drain from above on the right. Does anyone know if it’s possible to move the washing machine into this space and use the same washer drain except it would be cut to about a foot above the main drain? I’m afraid the other waste traveling through this pipe would exit from the open top of this drain if it was cut. Thoughts? Or other options?

Don’t know how you would get a P trap in there. If that is the main, you would have pretty bad sewer gasses coming out of the stand pipe without one. Our basement install has the washing machine drain into a concrete sink that drains into a concrete sump and uses a pedestal pump to connect to the main.

There could be room there, if the washer is capable of pumping high enough.