Cast iron pipe is too low to a use gasketed toilet flange replacement
It sounds like you can get at the pipe from below. I would highly suggest cutting some of the cast iron away and using a rubber gasket coupling (i.e. a Fernco) to transition to PVC. Then you can put a regular PVC pipe flange up there and avoid the problem of depth entirely.