I know that sewage plants burn off the gas from the digesters. I’ve even seen them recover the gas for usage as a source for heat instead of natural gas.
The problem is, the gas has a high moisture content and is very hard on piping and controls.
You would most likely find the same problem with a septic tank.
Mother Earth News used to carry articles about this type of self sufficency. I would start with them .