As someone who actually was working in excavation for internet... well, some points to unpack here:
- You don't hire your own workers to dig trenches as an ISP, you sub-contract that stuff out to contractors - they can spread out the cost of, say, a backhoe not over the one year or two you need to build out a district's fiber, but over twenty years.
- Other underground stuff isn't much of an issue in rural areas - you have the central map register of the district which shows exactly where active lines are, and there aren't many. Usually it's the 10 kV/220V electricity line, water mains and the huge POTS cable. Sewers in most cases aren't much of a concern as they tend to be built very deep (here in Germany, minimum 100cm below ground level, and usually it's more like 2-3 meters). In rural areas you can usually get away with shooting a mole through the ground or a plough for a trench that a following tractor immediately closes after the pipe is laid in.
- That pipe or whatever you're building out underground can last literally for decades. POTS cable in many cases is over fifty years old, personally I have seen stuff that was covered in clay protection plates with swastikas meaning it was well over 70 years old. At 50 years, the life time earning of a connection is 33.000$.
- Governments usually subsidize the cost because broadband is an extremely net-positive investment. Assume a small village of 100 people gets broadband Internet uplink - now a small company moves into some farmer's shed because the rent is cheap and now pays tens of thousands a year in corporate and employment taxes.