My goal is to keep hot/cool air from seeping between floors. Is canned spray foam the way to go? Any recommendations? Pest resistance is a bonus.
You would want something like this. The important part is that it comes in two pieces so you can install it without having to disconnect anything to pass it through. The brushes are to resist airflow, but they are obviously not going to be airtight or pest resistant. For that, I would use expanding foam insulation. Those cables and pipes aren’t going anywhere, and if you absolutely had to replace one, removing the sprayfoam is a trivial effort compared to the rest of the job.
Expanding spray foam.
Also a huge fire hazard, don’t do this.
What ever you do, don’t do what I did.
If this is the ceiling and a small room I would put a utility ceiling in. Where I live for a room like a simple washing room that would be 150 euros tops and you can always run new wires and get to the old ones without hassle. Nothing else will make it look pretty.