It takes place before CD because SEGA said so lol. But fr this video I watched “Classic Sonic Timeline” by KJ Broadway explains it pretty well. Basically what he says is that, Eggman had the most trust in Metal Sonic. But even if Metal failed (he did) Eggman would have a plan B which is the final boss. Eggman had Mecha Sonic Mk 1 hold off Sonic so Robotnik could get to the Death Egg. Mecha Sonic Mk 2 was trying to hold back Sonic from getting to the Death Egg which is why before Sonic fights Mecha Sonic Mk2, Mecha destroys the teleporter.
Great theory here. But Metal sonic can better than Mecha moc2. Like you said, metal sonic fits sonic the best and eggman could have use the time Stones to help production. And people do think that sonic destroyed the generators in sonic CD to get the good future and eggman got the time Stones and also that makes sense why in sonic 4 episode metal/2 metal sonic is brought back in stardust Speedway bad future. So eggman could have use the time Stones. Or like you said Mecha moc 1 is unfinished.