Hi,
That's indeed quite nice ! Thanks for sharing.
I would add that line:
if ((hikaInput::get()->getCmd('task')) != 'show'){return;}
as a products listing would also have a ctrl with "product" in the URL and that would mean the code below would be processed on the listing. that might not change anything in your case, but it would help for some others based on how their shop is structured.
Also, there is a potential issue for others:
if they have several products listing modules on the product page, that plugin would add the condition on all the modules. If you want it only for one of them, it would require for example a static variable to add the condition only the first time, or only the second time or etc based on which module should receive the condition.