Controlling legionella is pretty simple; 0.5 ppm chlorine added to the water - which most municipalities in the US already do, although Canada may be different - or maintaining hot water temperatures that are 125 or above; either will not only prevent any active bacteria from multiplying, but will also kill off any new entrants into the system in relatively short order. This is one of the reasons that we set any heater we install to 125; the other is that 140 is hot enough to cause severe discomfort. Personally, I'd put in the conventional tank-style heater, set it at whatever temperature I wanted that was 125 or above, and invest the significant amount of money that I'd saved from NOT buying a tankless heater into a nice tempering faucet.

Also: periodic maintenance on a water heater will greatly extend its life. Flush the tank once or twice a year, change the elements as needed and check the anode, and you can get a LOT of life out of a modestly-priced unit.