I think the framing of "is it immoral to be a landlord" contains a category error. The system of housing-as-investment is immoral. Individual landlords range from parasitic to barely-getting-by themselves.
Your small landlord with two properties who actually maintains them and treats tenants well - are they the villain? Or are they people caught in a system where housing wealth is the only way to retire because pensions are gone and Social Security is inadequate?
The real question is why housing - shelter, a necessity of life - should be structured as a commodity whose primary value is capital appreciation. That's the problem. Individual morality is a distraction from systemic dysfunction.
But I understand the appeal of the simple framing. It's easier to locate evil in a person than in an incentive structure.