Are you planning on upgrading? Because a 40 gallon long isn't big enough for a Red Devil, P' Bass or Stingray so definitely no on tankmates. You'll be hard pressed to find something that would be suitable long term with that size tank. Maybe a Sanchezi Piranha alone or a small group of Exodons 5-6 though I think they need a bigger school to be kept successfully without them turning on each other.
Agreed, unless you plan on upgrading to a much larger tank (depending on what you keep) that 40G tank isn't going to last long...
Also, just as a heads up, there is no such thing as a freshwater Moray, at least not one that you'll find commonly sold in the hobby, since most the morays marked as freshwater in the trade actually require brackish to marine parameters to live long term...
On the other hand, if you don't ever plan on upgrading your tank to anything larger than the 40G, i would highly recommend some of the smaller freshwater puffers, loads of personality and they are predators in every sense of the word...
Then depending on how you decorate the tank, you could go with a bunch of Dwarf Puffers (Carinotetraodon travancoricus) in a planted tank with some Ottos and cherry red shrimp, or you could even keep possibly 3 of the smaller red eye species of puffers such as the carinotetraodon lorteti...
But no matter which way you plan on going, i would do as much research on here as possible first to prevent picking up a fish that will eventually outgrow your tank...