Can infrastructure costs be covered by taxes on flat sales/rents?
Yes,

What you are describing is called value capture. There are a variety of forms of the tax, each with their own pros and cons. The general idea is that infrastructure, particularly transport infrastructure, disproportionately benefits parties closest to the line.

A good example is happening in Western Sydney in what was semi-rural land. An international airport and substantial extra development. Large land-owners found that their property is just down the road from a planned town-centre and they can build apartments on their paddocks. There was massive value uplift which was not captured by the government, but could have been.

I'm not aware of a reason why the policy shouldn't work, but it is politically tricky.