Exactly. A low end micro-controller would do the trick but a Raspberry Pi is much more accessible - almost anyone can get one fairly quickly and if they themselves don't have the knowledge to do the setup they most likely know someone who can help.
YMMV.
In most cases, MCU IDE's like the classic Arduino one don't even give you an allocator, all data must be statically allocated beforehand.
IIRC it doesn't use the stack either. The main() and loop() functions initialize all their variables statically.
When you have 2KB of memory to share between code, data and stack, allocating and using stack for function calls is luxury that only introduces problems.
Hence, I've never ever ever seen an MCU crash from segfaults or OOMs.
On the plus side they will also use vastly less energy. 10 Milliamps is enough to drive a ESP8266 or ESP32, in deep sleep you start counting microamps. A single battery cell can easily last a month.