Except, why didn't the ancient Romans or Egyptians invent the Internet? They had enough civilization to build empires.

There's a tech tree, more or less.

You need steam power, chemical batteries, basic metallurgy, and the telegraph to make global communications networks obvious.

With constant conquest and expansion Rome was full of slaves which distorted the market need for mechanical power.

Hero of Alexandria made a little steam powered spinning toy which could have been the inspiration for steam power and the industrial revolution but it wasn't and the western empire was already on the path to decline. When the expansion hit its practical limit Rome fell apart instead of industrializing under the effects of Christianity and a series of decadent or just bad emperors.

Rome made ENORMOUS strides in the advancement of civilization when it came to organization and institutions it just didn't hit the industrialization spark and stopped advancing.