Even if their ODO definitions suggest they are interchangeable most of the time, are there fine differences in meaning between them?
Here is the Webster's Dictionary of Synonyms (1942) entry for the three words (plus citizen):
Inhabitant, denizen, resident, citizen are here compared as meaning one whose home or dwelling place is in a definite location. Of these terms inhabitant applies regularly in nonfigurative use to animals as well as persons, and only denizen applies also to plants and sometimes even to words. Inhabitant, the least specific word, implies nothing more than an abode in a given place; [example omitted]. Denizen denotes one that belongs by birth or naturalization to a given locality; [examples omitted]. Originally, though now rarely in literal use, denizen denoted one who lives within a country (sometimes a city) as distinguished from a foreigner; later it came sometimes to be applied specifically to a naturalized alien [example omitted]. Even when substituted in literary use for inhabitant, denizen retains something of its own flavor of belonging to the locality by birth or naturalization; [example omitted]. Resident is not always clearly distinguished from inhabitant, especially when a town or city, as distinguished from a state or country, is in question. Often the term implies nothing more than tenancy of a room, an apartment, a house, or the like, for a considerable length of time; [example omitted]. Often, in the case of a person who has several residences or who lives mainly in a place other than the one regarded as his home, the term suggests not permanent inhabitancy but legal recognition of one of these places as his domicile, and as the place where he votes, pays his income tax, and the like; [example omitted]. In reference to a country, resident is preferred to inhabitant as a designation of an alien living in that country for a time and regarded as subject to certain taxes. [Example omitted.] Citizen, as here compared, ... applies to a resident of a city or town, especially to one of full age who enjoys the right to vote and other privileges; [example omitted].
Merriam-Webster's Dictionary of Synonyms (1984) has a nearly identical treatment of the first three words, suggesting that the distinctions didn't change much (in MW's opinion) over the intervening 42 years.
S.I. Hayakawa, Choose the Right Word: A Modern Guide to Synonyms (1968) doesn't discuss any of these noun forms, but it does make some interesting observations about the related verb forms reside and inhabit (considered as part of a larger group of verbs that also includes dwell, live, occupy, and settle):
Reside is the most formal term in the group and is preferred to any of the others when a legal and permanent abode is being emphasized. [Examples omitted.] Reside may also suggest a tenancy of an elegant or imposing home: ...
Inhabit carries less of the implication of having a fixed abode than do reside and live. When used in this sense it tends to sound high-flown or archaic. Rather it points to people or animals living in large areas or adapted to specific physical environments. [Examples omitted.] Inhabit may also lay stress on the using of a place as a home or shelter: ...
Hayakawa's treatment suggests some similarities between the verbs reside and inhabit as he describes them and the nouns resident and inhabitant as Merriam-Webster treats them—in particular, the stronger legal aspect of reside/resident compared to inhabit/inhabitant. But in everyday use, the main difference I see between resident and inhabitant is that the latter more strongly suggests year-round domicile in the specified place, whereas the latter has a broader reach and may refer to year-round or temporary domicile, as in "She is a winter resident of Phoenix."
With regard to the dictionary's observation that inhabitant and denizen are sometimes applied to animals as well as persons, I note that Shakespeare memorably uses citizen in the same way, in As You Like It (act II, scene II), where a lord in the banished duke's circle reports the reaction of Jaques to encountering a mortally wounded deer in the forest of Arden:
"Poor deer," quoth he, "thou mak'st a testament/As worldlings do, giving thy sum of more/To that which had too much:" then, being there alone,/Left and abandon'd of his velvet friends;/"'Tis right," quoth he; "thus misery doth part/The flux of company:" anon, a careless herd,/Full of the pasture, jumps along by him,/And never stays to greet him;/"Ay," quoth Jaques, "Sweep on, you fat and greasy citizens;/'Tis just the fashion: wherefore do you look/Upon that poor and broken bankrupt there?"
Here, of course, the choice of citizens emphasizes the similarity in conduct between the herd of deer and the herd of men that Jaques implicitly compares them to, both as to their velvet and greasiness and as to their lack of fellow feeling.