There is product software (software in a device or software that is a device) and non-product software (that which is used in the execution of the QMS).
Product software (which is clearly extended down to low-level firmware!) does, indeed, have validation (and verification) plans and reports which are part of the DHF but wouldn't be part of the DMR.
Non-product software (your ERP example), would also have validation plans and reports but these are just kept as quality documents / records and, since not part of the product, would be outside of the DMR or DHF.
Does that help?