I grew up in Sri Lanka, and apart from the lack of coconuts in a house disqualifies it as a house, owning an elephant signaled how prestigious the house was.
Even nowadays, there are still families, temples, and governor houses that own elephants. They are brought together to a big festival we have in my former city, Kandy. More than a 100 of them, easily. They are well treated; they are fed, and many vets take care of their health as well. At the same.time, it's not unheard of the elephants attacking humans when panicked. They live their entire life alongside humans, and in a heartbeat, they get panicked and attack everyone around them.
I have come to my personal belief that leaving enough distance with them is the best way to help out. They are smart animal beings that can manage to live in the wilderness, and pretty much every elephant death we hear in Sri Lanka involves either a train hitting one, some asshole shooting one, or some asshole owning one and not taking care of them.
It's not possible to put a price on their lives of course, but if anyone is interested in how much it would have cost them, a small 5-6 year old elephant is about $15K.