Then, i did not take out the whole display and left it in the hinges on the bottom side and held it up with two small cardboard boxes. Easy enough to disconnect the hdd then.
I replaced with an ssd, put that into a ssd enclosure. Had to drill an extra hole in it to fasten the pins that hold it in place.
Used Carbon Copy Cloner to make an image from the old hdd, with the sad connected via usb. Checked it of it booted via System Preferences > Startup Disk. It worked so the took the imac apart and replaced the disk. Booted, everything was working as always, only faster!