Thank you for the information, so the 4" drain pipe is fine because the lowest point is the first floor which is about 1-2' above ground level. The washer drain line does not currently have a BWV valve, so I guess I should get one installed then.
If the output of the standpipe was above ground level, you would not spew. Codes rules limit how high the standpipe for a washer should be. Just extending the standpipe to more than 42 inches above the trap weir could cause that trap to siphon. Some codes call for a maximum of 30 inches for that dimension.
If I raised my trap and standpipe high enough to get the top higher than the ground level, I would be in literal violation of codes, but my standpipe would not overflow. I am not a plumber, and I am not recommending that somebody else might want to override codes to prevent sewage backup without getting an exemption. I don't know how applying for an exemption would work.
Backup valves can leak. I do recommend having a plug, such as a test plug with a wing nut, that can block off the standpipe temporarily if needed. A valve could add backpressure to the fast flow of a washer.
A pump in a basin, that pumps the washer water up to where you drop it down into a sewer line is permitted usually.
http://www.zoellerpumps.com/pt-la/product/62-drain-pump-series
So no matter what happens, the first floor toilet or sink will not spew sewage?
If the sewer got blocked, continuing to use your sink could cause your toilet to overflow if that is the lowest rim. If you have a shower or even a tub, the toilet is probably not the lowest first floor rim. But if it is just overloaded city sewers, then your sink use may push your water into the lowest neighboring basement that does not have overhead sewers or other effective protection.
Putting the washer and dryer on a different floor has some convenience advantages. Plus it lets you plug the basement standpipe.