Old flange, new wax ring, tile and toilet. Proper repair/reinstall?

The toilet in the guest bathroom washed out from the base of the toilet. After removing it, there were roaches that appear to have been nibbling on the wax ring until it washed out. One of the toilet bolts was not fastened and the other side was loose, probably the worst toilet install I've ever seen.

This is probably a forty to fifty year old townhome in Houston, TX we moved into about six months ago. I'm guessing the flange is bronze, the drain is metal...has to be the original. Anyway, it all appears to be intact with the exception of the wax that has eroded away.

We plan to replace the parquet flooring with tile of roughly the same final height, maybe slightly taller and install a new toilet.

What is the best way to ensure a good installation for the new toilet? Does the old flange need to come out even if it's not cracked/broken? And if it can stay in place what is the best type of wax ring to ensure the correct height is achieved given the new tile going in the bathroom? Thanks in advance...

Yes. The proper way to fix this is to raise and reset the flange. Alternatives that will work most of the time are: add some flange extender ring(s) to bring it up to the proper level and use a normal wax ring; or, take one wax ring with the embedded funnel, stack in on a second, normal wax ring so the funnel is going through the middle, set them both on the flange, then set the toilet down and anchor it. If the funnel fits in the toilet flange without collapsing, you should be okay.

use a "raise a ring" its a souix chief product. works great. costs maybe 8 bucks. install it per instructions and then use a standard wax ring just like a standard install.
Ive done the 2 wax ring thing before, and most of the time it works, but to be honest, as a pro I feel obligated to do things at the best of my abilities if i can. If you can put a raise a ring on the old flange, then i would do it. If it wont work, then maybe consider 2 rings