Sump connected to sewer drain?

I know it is wrong to connect sumps to the sewer system because sewer gas could backup into the home. My question is, if there are backflow preventers on the drain pipe at sump will that stop the gasses from coming into the home?

Based on your pic, if the pit has water over the pump it would act like a P trap, water keeps the gas in the pipe system, but if the pit was dry, what would stop gases from entering the pump and then the pit?
If the pit was sealed like sewage lift pumps are there would be no sewer gas.
There may also be a local bylaw about sump pumps not allowed to discharge into the sewer, like there is where I am.

The sewer gas thing is really irrelevant and super unlikely with most installations due to the sump being submerged the majority of the time. The issue is dumping stormwater into a sanitary sewer or a septic tank.

You would’t want it dumping into a septic system at all. Some municipalities meter sewage out flow as well. I would mention that in your comments because it could have a significant impact on the water and sewer bill if applicable.

In my neck of the woods, it’s considered an illegal connection to the city sanitary line. Right now, the city is giving rebates to correct these but that’s step 1. Step 2 will probably give fines and make owners fix it.

Sump Pumps shouldn’t discharge into the sanitary sewer