TL;DR
Aim for grade 5 and 6, at least Rare rarity or higher. You need to hit at least 2 good substats. That's it. Don't overcomplicate it.
Grades
I personally go for grade 5 and 6. I can sometimes use a grade 4 if it's Legendary rarity with good substat rolls, but that's a mid-game choice, not endgame. Grade 5 can absolutely be endgame gear if the sub rolls are good.
Grade 6 has the highest substat values. If you get lucky and multiple rolls hit the same stat, the item gets broken. You can reach around 25% HP or 15% CRIT RES from a single item's substats alone.
Sets
I've been using ATK set for DPS and HP set for tanks, and I've gotten good results so far. ATK has no diminishing returns, so the higher the value the more damage you do. And HP scales way better on tanks than DEF.
There's some consideration to use SPD set for every role, but I'm not sure about that yet. Needs more testing.
Substats
DPS
I aim for ATK substats, hoping to get at least 2 rolls hitting ATK, sometimes reaching 12%+ from substats alone.
But going full ATK has problems - you get less SPD and CRIT. CRIT Rate increases damage a lot, making you one-shot people. And SPD helps you not get one-shotted. If you can reach at least 100 SPD, that should be fine to not lose most of the time.
Tanks
There's discussion about picking CRIT RES over HP to help not getting one-shotted, which really makes sense. Some people say even 2 CRIT RES + 1 HP set is not a bad choice. This needs more testing to confirm.
For tank substats I aim for: SPD, HP, CRIT RES, and DEF.
Final Thoughts
At the end of the day: aim for grade 5 and 6 with Rare rarity or higher, and hope for good rolls.