If the print didn’t come off the bed, I don’t think adjusting z-offset will help. As prints get taller, if you’re running into issues with warping the corners will start to curl up.
Your printer definitely missed some x or y steps. Whether that was due to your drivers getting too hot and just that, or the extruder running into the print. Have you ever seen your printer do this:
If it’s heat it could also be a cooling thing. If you search the web on your search engine of choice for “<printer name> driver overheat” you’ll see what solutions the community has already come up with.