Bill:
Welcome to Ireland Reaching Out!
I searched on a free site www.irishgenealogy.ie which has Co. Kerry church records. I did not find a baptismal record for Denis with father Charles or William. In fact there was only one Denis McCormack baptismal record (different father's name) in Kerry from the late 1700s until 1860. The surname is not very common in Kerry. You can use this site https://www.swilson.info/sdist.php developed by one of our volunteers that shows where surnames were found in the mid-19th century. Antrim, Westmeath and Tipperary had the most McCormick/McCormack records.
I also searched the subscription site Roots Ireland and did not find a baptismal record for Denis or a marriage record for Charles or William to Mary McDonald anywhre in Ireland
Likely William came from another part of Ireland and Denis was baptized in a different county than Kerry. As a Harbour Master, William would have likely moved around.
You may want to add Denis' story to our XO Chronicles site and posibly someone will see a connection https://www.irelandxo.com/ireland-xo/history-and-genealogy/ancestor-dat…
Have you considered DNA testing?
Roger McDonnell