How to implement a $_SESSION alternative in WordPress inside a theme without a plugin?

You can just use a cookie, like you’ve attempted. The problem is that your logic is continuously adding the cookie. This is because setcookie('pxpop', false, 0); is removing the cookie from the user, so you end up in a loop. This is your code’s logic:

IF user does not have a cookie
     give the user a cookie
END IF

IF user has a cookie
     display popup
     take the cookie
END IF

So you can see why nothing will change on each load, because the user never visits the page with a cookie.

What you want to do is:

IF user does not have cookie
    display popup
    give user the cookie
END IF

Also, your cookie is set to expire when the browser session ends, so it wouldn’t last long regardless.

Addressing both issues would look like this:

<?php
function pop_event() {
    if ( ! isset( $_COOKIE['pxpop'] ) ) {
        if ( is_active_sidebar( 'msg-pop' ) ) {
            ?>

            <div class="open_initpop">
                <?php dynamic_sidebar('msg-pop'); ?>
            </div>

            <?php
            setcookie( 'pxpop', true, YEAR_IN_SECONDS );
        }
    }
}

Keep in mind that this solution is not going to be compatible with many caching solutions. My recommendation would be to implement this entirely in the client, since you’re presumably going to be using JavaScript already for the popup.