Advice: Template structure – php blocks in sidebar or someting else?

I would say to add them as template parts as in content-[name].php. For instance in page.php you could have something like:

<?php while ( have_posts() ) : the_post(); ?>
            <?php if (is_page( 'home' ) ){
                 get_template_part( 'content', 'benefits' );
                } elseif (is_page( 'Contact' ) ){
                 get_template_part( 'content', 'contact' ); 
                }  
             } 

            get_template_part( 'content', 'popup' ); ?>
        <?php endwhile; // end of the loop. ?>

It seems to make more sense as it is content after all.