So can Stack Snippets be confirmation-to-run when they have dangerous items (e.g. infinite loops, cookies, or infinite server requests)?
This is provably impossible. It would require solving the halting problem, which is described by Wikipedia as:
In computability theory, the halting problem is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running, or continue to run forever. Alan Turing proved in 1936 that a general algorithm to solve the halting problem for all possible program-input pairs cannot exist.
Note that bit at the end stating that a general algorithm to solve the problem cannot exist. Unfortunately, determining whether a program runs forever (i.e., an infinite loop) or performs some other particular action is thus impossible. Imagine, for instance, a piece of code that checks if the user is a normal user or the detection system before running the infinite loop. Or perhaps it queries a remote server to ask whether to do it. If this were possible to detect, writing anti-malware software would be a lot easier.
Separately, it's worth noting that running the client-side one in the Stack Snippet editor doesn't crash my browser (Firefox), just freezes the page for a little while until I get asked by the browser if I want to stop it.