Elemental Attributes are Bad for Strategic Depth
We've see it done so many times, that we just assume it is good for making a game more strategic... but it actually does the exact opposite. It makes the relationship between any two given adversaries more predictable which makes any other rules in your game less meaningful.
Let's take a common elemental chart like this:
Now lets say you have to choose between attacking with a Fire Hero who drops a single enemy's defense by 30% for 5 turns, and an Earth Hero who can AoE silence spells and poisons enemies for 90 damage over 3 turns, and you are going up against a Water hero who can reduce accuracy by 40% for 4 turns... who do you bring?
Knowing which power is best is really hard to guess and may change a lot based on the battlefield and what other heroes there are; so, without elemental factors to worry about it takes a lot of critical thinking skills to decide which one is better... but once you put in elemental bonuses, it becomes clear that you should attack with the Earth hero, because all other powers aside, you know he will do better than your Fire hero.
What normally happens in JRPGs is that your heroes have an element, a level, and unique powers. If your level is high/low enough, there is no strategy. The battle is a lost cause for one side or the other. Then you match up colors to offset some of that level to punch a bit above your weight class... while this is a satisfying experience for many players, it is just as deterministic as not having elemental bonuses. Now lets imaging you have 15 well leveled heroes to pick from and can only bring 3. Each of those heroes has some unique power that may or may not help based on the unique powers of your enemies. There are many matchups to consider, but if the enemy has 3 fire heroes, you will always want to bring your 3 water heroes no matter what. 12 possible strategies are immediately removed from consideration based on a counting and color matching strategy that a 4 year old can solve. If you remove the elemental bonuses and simply drop the matchup level of enemies a bit, then the game becomes more strategic because now all 15 heroes are valid picks. You can still hit above your weight class a bit, but only with well though out combinations of powers that takes a much more mature though process (and a fair amount of trial and error) to figure out.
Why Are Elements so Popular?
They are popular because they reduce the difficulty of a seemingly complex game. Game designers often have to choose between complexity and playability. If your game is too complex, then it will only appeal to niche audiences, but simple games appeal to people of all intelligences. Games like Pokemon are appealing to children because before you learn all the complex rules, you can still do well understanding only the very basic rules of levels and elements.
They can also be seen as helpful for making games where the point is to collect a lot of different heroes. If you have 100+ heroes in your game, seeing a lot of thier powers and roles overlap in inevitable. Elemental bonuses can basically be used to copy many very similar powers/roles across many heroes without making any one of them completely useless because having an Earth Healer might not be very helpful when fighting a Fire Army, so also owning a nearly identical Water Healer becomes important. This does not really make the game more strategic though, just makes it easier to stuff in lots of extra content and grinding to increase play-through time.
If you want a game to be enjoyed by millions of players of all ages and demographics and keep people entertained for a long time, then elements is a smart way to go, but if you want to make a very tactical game that focuses on thinking things through... it's actually better not to have them.
The deepest strategy comes from the vaguest METAs
Part of what makes Chess so strategic is that both players have characters with a wide range of powers, but no one piece can be uniformly described as superior. Pawns are numerous making them good sacrificial pieces for baiting traps and blocking movement. Rooks, Bishops, and Knights can all cover a lot of ground but have significant blind spots that can be exploited. The queen is a bit OP, but you only get 1 so you have to plan heavily around what the queens are doing... but at the end of the day, a well played pawn is every bit as lethal as the queen. Bishops don't beat Rooks because anyone playing a Bishop can always beet a Rook with one, but they beat them WHEN one player does a better job of maneuvering the bishop, than the Rook player does of maneuvering the Rook.
If you add elemental abilities, make them represent abilities and not paper-rock-scissors relationships. Maybe all Fire heroes have a chance to cause burn damage, all dark heroes have a chance to drop enemy accuracy, etc. That way, it becomes more about bringing the right hero for the job, and not any one of the right 30 heroes for the color matchup. Another way elements works is to tie them to skill trees: so, you could make it such that all Fire heroes get a common set of skills and bonuses they can get, (probably in addition to individual hero or class skills and abilities.)