Absolutely. This exists. My Eufy devices have on board looping storage. A well designed camera that has battery backup and local+cloud storage would work in any situation except where a thief jams the Wi-Fi then steals the cameras. But at that point you have an extremely determined and professional thief and no security measure is impervious.
What?! A device that works offline in 2022?! Absurd! ;)