Motorola Moto G 2014 freezes on lock screen
Okay, so I found the solution a while ago and I haven't experienced any problems since, so I guess it works.

I tried different options to get the device working again, but to no avail. The only possibility left was a factory reset, so that's what I had to do. Here's what I did:


I made sure the backup settings on my phone were all set up.
I used adb backup from my computer to make a nearly full device backup, as suggested by Lucky in the comments. More info here: Full Backup of non-rooted devices


For this, make sure you have a password set and configured in the developer settings. This is really important because it might not work otherwise and you'll lose data (happened to me, would not recommend).

Then I reset the device. https://motorola-global-portal.custhelp.com/app/answers/prod_answer_detail/a_id/99825/p/30,6720,9151 for more info how.


It took some time to reconfigure everything and redownload apps, but after a week or so, my device was back to normal and I haven't had any freezes since.