But mechs cannot take recoil as well as tanks, which means that your aspirations for mechs to be these self-propelled anti-tank turrets aren't founded in reality. If you are going to factor that they can trip over often enough that you need to make specific technology just to get them back on their feet, what is the point? Why go up stairs with a mech when you could have a squad of men do it better? Why even go up mountainous terrain with a mech when you could ride up it with a powerful tank? Why go over barricades when you could smash through them, giving you an even bigger advantage.
Tanks are more mobile, easier to get a crew into, easier to hide, can have bigger guns, and can have more armor.
Tanks better, man.