If boiling was magically making anything safe, the danger zone wouldn't be such a big deal, you wouldn't need to refrigerate your stock, you'd just need to boil it before using!

Some bacteria resist to heat and cold. If you leave an item in the danger zone for 1 hour before putting it in the fridge, your bacteria will multiply for one hour, then the multiplication will slow down while it's in the fridge (or freezer). Then when you take it out of the fridge or freezer for 1 hour 1/2, the mulitplication resumes. Then you boil it, the multiplication slows down. Then you let it rest for 2 hours, the multiplication resumes.... it's now been in the danger zone for 4 hours and 1/2.