--- Quote Start ---
Now don't shoot me I fully appreciate that the Pico is a completely different beast to Nios - only 8bit core and I had to write code in assembly language rather than C.
The end result though is that even though it might take me a couple of weeks to get it to work I ended up with designs that would be nothing more than a handful of gates and 1 or 2K bytes of code.
!
--- Quote End ---
Well, assuming you had apples-apples functionality that you wanted to hand craft assembly for on NIOS, you could do it. However, you're still left with a 32-bit vs. 8-bit architecture and need to be aware that every instruction is taking 4x the space.
Regarding bugs related to running out of memory, the best tip is to not use dynamic memory allocation (malloc()/free() or new/delete) and instead allocate everything statically; that way the linker tells you when you run out before you load it into the hardware and find out the hard way.
You may or may not find a book like "Programming Embedded Systems with C and GNU Development Tools" somewhat helpful.