ABC, compute Bayes factor from posteriors

I am pretty new to ABC stuff so I may be saying dumb things.

My question is: I ran an ABC with two models $$M_1$$ and $$M_2$$ and now I have an approximation of the posterior distribution for both model.

If I do a posterior check by re-runing enough simulation for which I sample the parameters from the posteriors, is it possible to get back the likelihood of both model in order to calculate their Bayes factor?

I was thinking (probably wrongly) that taking the ratio between the number of simulations falling under a small threshold $$\epsilon$$ may do something related to the Bayes factor, something that may be written like: $$BF_{1,2}=\frac{P(M1 | d(M1,D) < \epsilon)}{P(M2 | d(M2,D) < \epsilon)}$$ (where $$d()$$ is the distance function used for the orginal ABC)

Since the Bayes factor is given by$$B_{12}(D) = \frac{\text{Pr}(M_1|D)}{\text{Pr}(M_2|D)}\Big/\frac{\text{Pr}(M_1)}{\text{Pr}(M_2)}$$the ratio of frequencies of simulations from $$M_1$$ and $$M_2$$ that are accepted need be divided by the prior probabilities of $$M_1$$ and $$M_2$$ if these reflect the number of times each model is simulated. Apart from this, the approximation is valid.