Bad Omen can only be given by a direct kill by the player. Therefore pillager captains killed by "friendly fire" from other pillagers CANNOT give Bad Omen. If this is not fixed in the next update, i will NEVER play Bedrock Edition again (Even if the Java Edition is later shut down).
If you hit any enemy within a certain number of seconds before it dies, it counts as a player kill, even if you didn't give the last hit. I can confirm that pillager captains that I have not hit do not count as a player kill when even when killed within a few blocks of me, e.g. by berries or iron golem. So it is working as intended.