i think that technically copyright only really becomes a legal issue if someone besides the rightful owner is profiting from it. you actually see this all the time in media--in trope terms, it's called Lawyer Friendly Cameo, Captain Ersatz, and/or Expy where a character, country, etc. is clearly intended to be a pre-existing character but can't be them for legal reasons. you see this pretty frequently in comics and animation, and can be as much an homage as it is simply getting around lawyers--examples of all three come up in Alan Moore's League of Extraordinary Gentlemen, which is a full-on crossover of fiction, particularly public domain characters (the original line-up of main characters were Mina Murray from Dracula, Alan Quatermain from King Solomon's Mines, Captain Nemo, Dr. Jekyll/Mr. Hyde, and the Invisible Man), and included some expys (new characters based on older/contemporary ones) of historical figures using fictional characters (such as Oliver Haddo, who's used as a stand-in for Aleister Crowley) and some fictional characters that Moore didn't have the rights to use so they're referred to by aliases, such as Fu Manchu in the first volume who is referred to only as "the devil doctor" and the like
in theory, there should be no legal problems with a non-profit RTS game based on Tolkien's legendarium, just like (as i understand it) there's no legal problems with fanfiction as long as it isn't published (which interestingly HAS come up with an actual LOTR fanfic called The Last Ringbearer, published only in its original Russian because it'd be against copyright to publish it anywhere else) but i completely understand any reservations that WFG has against going forward with The Last Alliance--i myself am working on several writing projects which pay heavy homage to alot of media that i like and even if i don't end up publishing some of them i'm still being careful with exactly how i go about them