The profit value is on the event in your server container, so the Conversions API tag can send it as the purchase value.
Overview
There is nothing Meta-specific for us to build, and that is the useful part. The profit figure is a value on the purchase event inside your server container. Any tag in that container can read it, including the one already sending your purchases to Meta.
How it works
Your Conversions API tag takes its value from wherever you point it. Point it at the profit variable instead of order revenue and Meta optimises against profit. As with Google Ads, running it in parallel first is the sane order of operations: a second custom conversion carrying profit, compared against the revenue one, before anything starts bidding on it.
How to configure
In your server container, open the Conversions API tag for purchases.
Set the value to the profit variable, keeping the currency as it is.
Compare against your revenue-based conversion before moving optimisation across.
