Inject variables from Controller to Blocks?
You can't inject variables from a controller to a block.

Generally it would help to put the repository in a service, so that you don't have to instantiate it multiple times and are able to cache product objects queried before.

In this case you don't even need to call the repository in each controller/block, because Drupal upcasts entities to objects in routes and you can get the object directly from the route match, as long as the product entity is using the standard way to generate entity routes with param converter.