In theory yes.
You need enough power to supply the switch and the devices connected to it and the switch need to support PoE pass through.
Beware that the PoE standard the switch supply might be less than what it can accept as input and that might affect more power-hungry devices like APs, which might require more power than the switch can deliver in the pass through.
And yes the injector is overkill but will run nice and cool at the lower load and last longer than if you were say… maxing out a 10W injector. It probably wouldn’t be that much cheaper either.
I use a PoE++ injector to power one of those Unifi Flex switches in my detached garage, and have both a PoE-powered IP security camera and a Unifi access point connected/powered by the Flex switch. My whole home network infrastructure is Ubiquiti Unifi stuff…