I don't envy you this task
The last time I did this was to replace a cracked lens & it took me ages & left me all
Once the lens was off I used a hot air gun/paint striper type of thing to soften the mastic then just slowly worked around the groove with a flat blade screwdriver & a Stanley knife gradually removing all of the old glue over a period of time like the rest of my life
It is doable but what a bitch of a job
If you do manage to do it don't then use to much mastic/glue when putting it back together as it makes a proper mess if you do
Remember just enough if anything go just under put the lens on then have a look to see how much more you need remove the lens top up with mastic/glue then drop the lens back on
Good luck
I'll say a little
for you
I shant ever be doing it again though
Lifes to short