The formula
transparency = (1.0f - opacity_2)^4 * (1.0f - opacity_1);
you came up with is only considering one surface of the closed mesh.
If that is good enough for your use case, you could also try enabling face culling for the optixTrace call, which would halve your intersections (if your triangle vertex winding of the geometry is consistent).
See OPTIX_RAY_FLAG_CULL_BACK_FACING_TRIANGLES inside the OptiX Programming Guide.
If you actually want to handle volume absorption inside the volume (with Beer’s law), then you would need to be able to track the distance traveled inside the volume as well, means you would need to track and distinguish the surface transmission events for entering and exiting the volume surfaces and calculate the distance traveled inside the volume.
That would be easier with a simple path tracer where each surface intersection is handled inside a closest hit program which returns back to the ray generation to follow the ray segments with continuation rays (optixTrace calls) to get something like this:
rendered with this OptiX example program:
https://github.com/NVIDIA/OptiX_Apps/blob/master/apps/GLTF_renderer/doc/README.md
https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/16
Also note that you missed two intersections in your drawing between 2 and 3. :-)