I'm often having to type things like $a_{b_{c_d}}$ and would like the things to be scaled properly, i.e. in this example I would like d to be smaller than c. This can be done manually for each case with \scaleto as described in this answer, e.g. in my example this would look like a_{b_{c_{\scaleto{d}{3pt}}}}. This is still perfectly legible and allows one to spot that d is a subscript of c straight away, which I think is a little unclear if they are the same size. I've noticed that I have to change the font size depending on the character, for instance if we swap the d with an m then 3pt is way too large and a_{b_{c_{\scaleto{m}{2pt}}}} looks right.
Is there any way to hardcode this behaviour into the preamble, so that the the third nested sub/super-script gets scaled accordingly?