Formally, I don't think that having been granted a visa changes anything to your position. Depending on local law, border guards could probably still fine you for the earlier overstay. Of course you might also get lucky and nobody notices but you would be taking chances.
Importantly, the 90/180 rule applies across all visas and it's a rolling period (it does not really start or end, you must never have stayed more than 90 days in any 180-day period). Getting a new visa does not ‘erase’ the previous stays from the tally and you don't have the right to enter the Schengen area on a short-stay visa before some time in May.
Because of that, if you try to enter now, the border guards could not only deny you entry and send you back to your country of residence but also decide to annul your visa, because the conditions for issuing it were not met at the time it was issued (namely because you already exhausted your 90 days). It seems the consulate simply did not notice the second stay because otherwise they should have refused to issue a visa.
But at this point, the technicalities of the maximum stay rules are not your only concern. Border guards might very well think that your abusing the system to reside in Denmark and deny you entry on that basis alone (formally: because you have no adequate purpose for your stay).
You have stayed almost five months with short interruptions and both your previous stays have lasted two-three months. You last left less than a month ago, after a rather long stay that was itself illegal. Would border guards believe you when you enter now and tell them you fully intend to respect the rules?
If you want to go to Denmark (or elsewhere in the Schengen area) again, you need to wait at the very least until May-June, ideally longer than that, before trying to enter again. This would avoid the appearance of staying in Denmark semi-permanently and you would be more credible in claiming that it was an honest mistake, if someone does notice the overstay at this point.
But since you definitely cannot enter the Schengen area in March, it seems to me that your visa should not have been issued and could therefore be annulled at any time. The safest approach if you want to be able to help your family in the near future would therefore be to seek legal advice and see if you could secure another type of visa that would be more appropriate for the situation.