x86 assembly is surprisingly good at ray casting/tracing in tiny constraints - I know, it's unexpected! The reason is that the 8087 FP co-processor implements a stack machine with single byte instructions for common floating point operations. Have a look at the insanely great demo Pyrit (https://www.pouet.net/prod.php?which=78045) which includes documented source code for a simple raytracer in 256 bytes.
So when it comes to something like this, the way it'll generally work is that you already have the code pretty much in your brain. Then you write it out & make some size optimizations. Hence the short timeline
So feasibility assessment is easy: you already know what you're going to do. The initial idea is going to be something that tugs at your brain & you mull over it in the quiet moments of your life. & the expertise comes from experience
If you've written anything in x86 assembly before and at least know how raycasting works 5 days actually seems like a pretty reasonable timeline. I imagine that a lot of that was trimming the raycast algorithm as much as possible. For instance, normally you do a fish-eye effect correction but that's clearly been skipped here.
As to how people come up with these ideas? It's kinda just like any hobby project, you just have an itch to try something, mull it over for a bit, and then decide to do it. Some people juggle geese...