The usual depiction of giant humanoid mecha/robots is very unrealistic. They disregard the square/cube law, inertia, to just name a few violations of the rules of physics.
The most realistic depiction I've seen is the 1987 novel Fiasco from Stanisław Lem.
The mechas there were driven by a pilot suspended in a harness and controlling the (humanoid) mecha with his own limb movements. The nearly 2000 ton and nearly 10-story tall vehicle could run quite fast, but if you wanted to stop or turn with it, you would need a lot of place, just like driving a battleship. Sudden movements would lead to great structural damage, so the controls are designed in a way to limit the maximum acceleration of actuators depending on the load the appendages have to bear. There was even an emergency switch to allow the appendages to move with slightly higher acceleration and with higher force than allowed, but it could lead to permanent damage to the mecha. Even the emergency cryogenics system installed in them was the most realistic I've ever read in a sci-fi novel.
Are there other such realistically depicted mechas or robots in sci-fi? What was the earliest one?