Homes on a street at severe risk of flooding will be bought by a local council.