I was thinking the RP2040 as well. What hesitates me about the using a normal PI is it's a full computer and needs to be shut down properly ect. That's the same reason I don't use my piscsi often.
There are loads of appliance computers running Linux that can essentially tolerate being shut down via power-cord yank.
I think that one of them is the Lisa hard drive emulator I made, and for this one I can tell you how I did it. It's not based on RPi but instead on a (sadly now essentially discontinued) member of the BeagleBone family of Linux single-board computers, so in this respect the same thing. A stock install of the OS will require an ordinary shutdown in order to be safe.
So what I do is this. First I
disable most of the services that the OS enables out of the box, leaving just the ones I need remaining. This hastens the boot process but also cuts down on random services that write information to logfiles (remember this for later).
I also use a dedicated secondary partition for the hard drive images that the emulator uses: this is a FAT partition that nothing else writes to except for my emulator software
[1][2]. A FAT partition is simple, widely read, and many tools exist to do recovery in case I'm wrong about pulling the power. I edit fstab to add
special options for mounting this partition, including
flush, a FAT-only option that makes writes more aggressive (i.e. it doesn't leave data-to-write in memory for long but commits it to storage promptly). Good if the power gets cut unexpectedly.
The main Linux partition can't easily be FAT, so for this I
enable overlayroot. Now all writes to the root filesystem (the few remaining log lines, for example) get stored to RAM as "patches" to the files there: the original files are locked in amber, never modified. By design, the emulator doesn't need to remember anything that gets written to the filesystem, so here, too, it's OK if the power dies and the patches get lost; meanwhile, the true underlying root filesystem is mounted read-only, so that too is more-or-less impervious to power trouble. It's true that after a long time the writes to the overlay filesystem could fill up RAM eventually, but I've run my emulator continually for a couple of months with no issue. I have no idea what the true time limit is.
Finally, my emulator software is aggressive about flushing writes to disk
[1][2]. All this writing might make life hard on the SD card, but so far I haven't had any issues.
And so it has been for about six years? I've never had a problem or heard of anyone else having a problem, though I'll admit that there aren't a whole lot of these things out there in the wild!