This is my theory too, as it is just too easy and dare I say silly of a death for Loki.
Why would he attempt to stop Thanos, someone he has worked for and most likely understands the power of, with a simple surprise dagger attack? He also promises to Thor that the sun will shine on them and their people again.
Someone mentioned that if he had died, he would’ve transformed back into a frost giant, which he didn’t in that scene (from what I can remember).
One theory as to how he survived is that Loki was disguised as Banner throughout the rest of the movie (possibly explaining why the Hulk never really showed up except for a quick “No!” in the Hulkbuster scene.) A few things going for this theory is that we know that Loki has faked his death before, and that he can transform into different people. Even Steve Rogers. Of course, this doesn’t really prove the theory, and I’m curious to hear what you all think.
I do think that there is a good chance that they probably did kill off Loki more for practical than storytelling reasons, especially after his many faked deaths. Marvel would want to show that they can kill off a main character, but even a character as popular as Loki?