Apex managed sharing is the correct feature to control the visibility and access to cases shared with external partners. It allows developers to programmatically create sharing records that grant access to users based on specific criteria, providing granular control over record sharing. References: Apex Developer Guide - Sharing a Record Using Apex