“bad things would happen” if we somehow enabled the mains to the power company.
There’s a reason code requires generators to have an interlock with the mains, and it’s primarily so people don’t electrocute lineworkers.
In a local grid where the electric company actually allows you to feed back power it must also be possible to disconnect the generator automatically if your inverter detects the grid is down. Because of that these power companies typically only allow approved solar power systems to get connected to the grid to make sure it’s one that will disconnect.