Caveat: I''ve only just recently started getting into this bit of the game, so math could be flawed.
You have two factors to reduce damage from magic attacks (presumably large ones that you want to reduce as much as possible; this setup is only for those specific attacks): MDB and MDT. Base spell damage is divided by MDB and then reduced by MDT%, but as fractions of 256.
Since MDT% is capped at 50% (128/256), and it scales linearly, you focus on that first.
Your baseline: Shell IV (sch, rdm or unmerited whm), Shell V/1 (unlocked whm) or Shell V/5 (capped whm). Those give you 56, 62 and 70 (out of 256), respectively. Thus to cap you need an additional 72, 66 or 58 in gear.
1% = 2
2% = 5
3% = 7
4% = 10
5% = 12
10% = 25
Starting with the easiest, Iron Ram Lance (10%).
Remaining: 47, 41, 33
Pair of Coral Rings gives 14. Pair of Merman's gives 20.
Remaining:
NQ: 33, 27, 19
HQ: 27, 21, 13
Pair of Coral Earrings gives 4. One Merman's gives 5. Pair of Merman's gives 10. I'll use the 1 Merman value.
Remaining:
NQ: 28, 22, 14
HQ: 22, 16, 8
For body you can use Coral Scale Mail/+1 (3%/4%) or, if you're really lucky/well off, Avalon Breastplate or Valhalla Breastplate at 5% each.
Remaining:
NQ (CSM): 21, 15, 7
HQ (CSM): 15, 9, 1
HQ (CSM+1): 12, 6, -2
HHQ: 10, 4, -4
If you're a First Lieutenant in Assault you can get a Lieutenant's Sash for another 2%.
Remaining:
NQ (CSM): 16, 10, 2
HQ (CSM): 10, 4, -4
HQ (CSM+1): 7, 1, -7
HHQ: 5, -1, -9 (overkill)
At this point the Resentment Cape (5%) is only needed if you're only getting Shell IV, or if you get Shell V/1 and are using NQ rings. Otherwise you'd be better off using the Lamia Mantle/+1 for the MDB.
From cost/benefit perspective, if you have a whm with capped Shell V, you'd want:
Iron Ram Lance
Merman Ring x2
Coral Scale Mail
Merman Earring or Lieutenant's Sash (Merman Earring + Resolute Belt reduces damage slightly more, but HP earring + Lieutenant's Sash will always (as far as I can tell) provide more headroom for damage even accounting for the difference in damage taken.)
That would put you at 127/256, where 128 is cap. You would be hard pressed to save you more than 10 HP from capping it from that point, so it's better to add +HP or MDB gear elsewhere.
Avalon Breastplate or Valhalla Breastplate would negate the need for the earring or sash, so you'd only need 4 pieces total.
If the Iron Ram body piece has at least 5 MDB, you'll want to use that instead of the CSM and shift the difference in MDT% to the earrings and waist.
If you're working only with Shell IV, you'd want:
Iron Ram Lance
Merman Ring x2
Coral Scale Mail
Merman Earring + Coral/Merman Earring or Lieutenant's Sash + Merman Earring
Resentment Cape
The cheapest route (or if you just can't find the HQs for sale), assuming capped Shell V, and considering AN and IS items as 'free':
Iron Ram Lance
Coral Ring x2 (10k each)
Coral Earring x2 (10k each)
Coral Scale Mail (35k)
Lieutenant's Sash
Which puts you at 125.
Any of the above combinations (except for Shell IV setup) leaves you free to use all current Iron Ram pieces plus the Lamia bow & mantle for +MDB. Not much extra room for straight +HP (possible exceptions to above gear choices: Taru RSE2 hands probably beat the MDB of the Iron Ram gloves, and Cassie Earring may possibly be better than the MDT% of a Merman's), but you could use a Raptor Strap +1 for 15 (and +mnd if you're fighting Ultima; otherwise look for the +20 HP strap), various earrings, various neck pieces, and of course the Iron Ram pieces and Lieutenant's Saph all have +HP on them too.
If you're wondering about Askar feet for additional MDT%, you should almost always be better off using the Iron Ram Greaves.
The value I placed on pure HP in comparisons above is based on the spell damage of Citadel Buster with an estimated 2100 base (hedged slightly on the high side) and double weather boost of 25% (2625 total), as it's the highest damage single magic attack I know of outside of Mijin Gakures in Besieged, Atral Flows in Dynamis, and Meteor (and I'm just not sure what the Meteor values are).