Something about this feels really at odds with all the "locality of behavior" virtue the creator/maintainer often promotes.
https://htmx.org/extensions/multi-swap/
In that example, you'd just send partials for the card and cart elements and they'll both be swapped out.