I think that is basically what Wyze has done, only they haven't released their firmware.
There are open source versions of firmware for Wyze/Dahua cameras, but I believe they include major components that are just black boxes from the OEM. I don't know how much of that you would be able to reverse Engineer in a clean room.