I use a massive wood chipper on the cookies. As the cookie is invincible, it comes out intact, and I grab it
I use the previously aforementioned impossible map, put the cookie at the end, make it so that it runs without commands, make sure no blocks can be placed, and then deactivate commands. Oh, and it has to be on adventure mode.
The black holes happened to be really tiny, and evaporated really fast, causing an "explosion" kinda that happens to knock the cookie away... and into my hands.
I place the cookie in the accretion disc of a super massive black hole, and near the event horizon. An enchantment I put on the accretion disk and the black hole makes it so that you cannot use creative, you cannot teleport the cookie, you cannot be invulnerable to gravity, and you cannot use a magical time thing to evaporate the black hole. Upon touching the accretion disc, you rapidly get burns from the white hot plasma. The cookie is directly in the center of the accretion disc, which is a few hundred kilometers thick (nobody actually knows how thick it is but for the sake of this use 100 km.)