In order to avoid completely your problem completely, what about rephrasing your example like this:
"Nano-boxes are used in medical science, such as cancer treatment, where
they are used to inject drugs into cells, e.g. cancer cells."the nano-boxes
This way, you don't use i.e.'s or e.g'sg.'s too much, which reduce flowinginhibit the flow of reading, and it also eliminates your problem of having nested abbreviations.