I really like example sentences for sussing out differences like this. A lot of things become clearer with context - for example:
As you can see,
丈夫 is indeed used more for inanimate objects, but it's not because there is a hard and fast rule about what each adjective can be used to describe, it's because the two words mean subtly different things.
元気 can mean healthy, but it most often means things like
lively, etc. It primarily describes the way that someone or something acts or presents, so it mostly gets used with living things.
丈夫 in general has more physical nuances - it tends to mean things like
rugged. Consequently, you see it mostly describing things.
Both words can be applied to people, and might both be translated as
healthy in some cases, but they mean different things.
元気 evokes images of someone who is cheerful, where as
丈夫 evokes an image primarily of physical health. You can be frequently hospitalized for a health condition and still
元気 if your attitude is good, or depressed and still
丈夫 if you work out a lot, but probably not vice versa.