Transparent resin to fill small acrylic plastic container?
I’m answering my own question since I seem to have found a solution (and nobody else has replied). If anyone has other suggestions I still encourage them to add additional answers.

My first attempt was to use JB Weld brand ClearWeld two-part epoxy. This didn’t go well: As the epoxy cured it shrank, just a tiny amount, but enough to pull away from the acrylic plastic that surrounded it in most places, leading to a thin partially visible mirrorlike bubble boundary between the two plastics. Not what I wanted.

What actually did work was MG Chemicals 832WC Water Clear Epoxy Potting compound. This is designed for encasing electronic components, and did not appear to shrink at all. It does not adhere strongly to the acrylic (I can scrape it off with my fingernail in places where I had drips), and it is a pain to work with due to the long curing cycle (72 hours at room temperature, or one hour under 176-degree temperature). It is also fairly expensive (about $40 for 375 mL). These caveats aside, it does seem to have done the job, and its index of refraction is such that there is no visible boundary between the acrylic plastic and the cured epoxy: the entire project looks like a single piece of clear plastic, which is what I wanted.

Since I did not want to wait 72 hours, and had no oven that I wanted to use for epoxy, I wrapped my project in watertight plastic wrap (basically a Ziploc bag)  and heated a pot of water on the stove to 176 degrees (checking temperature periodically  with an infrared thermometer), and submersed the wrapped project in the water for an hour, using clamps to hold it in place.