The first question is the main topic of two recent papers: - Reggio's [Polyadic Sets and Homomorphism Counting](https://arxiv.org/abs/2110.11061), which is also a good reference for previous results in the literature (including that of Pultr mentioned in the comments). In particular, see Theorems 4.3, 5.10, and 5.12, the latter of which generalise beyond locally-finite categories. - Fujino–Matsumoto's [Lovàsz's hom-counting theorem by inclusion-exclusion principle](https://arxiv.org/abs/2206.01994). In particular, see Theorems 2.11 and 2.12. As far as I understand, the theorems give orthogonal sufficient conditions: it's unclear whether there is a general theorem subsuming both. I don't believe there are answers for enriched categories yet.