While the E28s can be a great example of longevity without undue cost, they can and will experience costly and inconvenient failures. Over nine years and almost 100k miles in my hands (up to 238k total miles by then end), my 1983 533i killed a couple radiators, a plastic heater valve blew up, the diff ate itself, thrust arm bushings failed twice, control arm bushings once, various electrics got wonky, etc.
My 2001 525i, which I've had for a little over a year and is currently at 110k miles, has had the entire cooling system replaced proactively for a total of about $550 in parts (radiator, expansion tank, hoses, thermostat, water pump, fan clutch), the alternator failed due to a blockage in the cooling duct ($240), the thrust arm bushings have been dealt with, as have the transmission mounts (~$30), and the alarm sensor for the hood went bad recently ($15). The interior quality is every bit as good as my E28 was.
While the E39 is certainly more complex, I have not found the parts to be more expensive than for the E28, nor has it been at all difficult to work on. The potential for expensive failures is there, but I really do not think that the characterization of the later 5-series cars as unreliable or difficult to maintain is apt.