I would create custom delete button and hide OOB Delete button . In my custom delete button , once user clicks delete check the number of child record in a customer if the count is 1 , delete the record using script action and show the javascript alert to the user .
FInd below script that may helpful to get started with implementing the solution. You can call below function in your custom button to delete record and pop message to user if if its last record . You may need to adjust entity name and field schema names
function deleteRecord() {
var req = new XMLHttpRequest();
req.open("GET", encodeURI(Xrm.Page.context.getClientUrl() + "/XRMServices/2011/OrganizationData.svc/AccountSet?$select=AccountId&$top=2"), false);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.send();
var returned = JSON.parse(req.responseText).d;
var count = returned.results.length;
var req = new XMLHttpRequest();
req.open("POST", encodeURI(Xrm.Page.context.getClientUrl() + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'')"), false);
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("X-HTTP-Method", "DELETE");
req.send();
if(count =1)
{alert("Delete customer record.")
}
}