Can we generalize The Baldwin effect theory to behaviors such as
Throwing out the eggs of host bird by cuckoos chicken or producing web and
poisoning of snakes?
Thanks

Not usually since they are not learned behaviours. See
https://en.m.wikipedia.org/wiki/Baldwin_effect