ive had similar issues, ive tried this, my recipe calls for brown sugar, i use dark drown as the higher molasses content holds in moisture better [same idea as why you brine a turkey to keep it moist] cut the sugars in to the butter with a fork, then for the eggs , if it calls for two i will take three, crack them in a cup and stir, not beat, then add the egg to the sugars, 2 by eye and see how it comes together, if it feels less sticky and more dry add bits more of the remaining egg, use fresher ap flour and mix it in stages, if that batch still is dry and crumbly then next batch add a table spoon or two of honey or molasses ,
these ideas are mostly based on choc chip cookies, but the principles can be applied to most .
cookie zhen master "be one with the cookie"