Can you provide the make and model fireplace?
There should be a listed firestop at the ceiling level installed per the listing. If the listing does not allow for caulking then you cannot do it without voiding the warranty and listing. You certainly can NOT install insulation against the pipe or encroach on the stated clearances. In fact, anywhere insulation could come in contact, you are required to install an insulation shield. The space around the metal firestop is called 'fireblocking' and must comply with the IRC 602.8 or whatever equivalent your code has. This entire chase appears to be open. BTW, firestops must be listed and cannot be site fabricated from blank sheetmetal.
I highly recommend you get a hearth pro in there to make these corrections and ensure proper installation. The mfr. of the fireplace should be able to provide a list of dealers near you. You can also go to
NFI Certified to locate the NFI Certified Specialist nearest you.
Bob