"debit COGS (for purchase value of the damaged inventory)
credit the asset account for inventory purchases"
You already have that entry from the original Sales Transaction. And you want to avoid using JE for this; that won't affect inventory or sales reporting. Further, you never post a JE to the asset account for inventory, if you are using QB inventory type item names. When you do that, you break the relationship between the Accounting and the Inventory management tools; you Changed an account outside of the requirement for the associated "Item Name reference" for qty and/or cost.
You create a Credit Memo for the customer and don't use the original items, since you are not getting an RMA condition. You use an Other Charge type item linked to an income account for tracking Refunds and Write Offs.
This Credited Value is either applied to that open invoice or applied to the New invoice for the replacement parts. The New Invoice is where you list the Replacement parts. If this had been a Paid Sale with no replacement shipment, this Credit Memo has the icon at the top to Refund the customer. And it correctly affects Sales and sales reporting.