You can place cooked food on your heap, it will eventually be turned into compost, but like you said it may attract vermin so you'll probably want to use a composter instead of a heap. Also large quantities of some ingredients (e.g. very oily food) may slow down the composting process.
Vermicomposting in a wormbin is similar to using a composter. Much of the cooked food can be thrown in, but you'll still have to be careful with some of the things. For example onions and citrus fruit should only be provided in small quantities as large amounts will raise the ph-level too much and the worms may die. Meat, fish and oily stuff can be processed, but often goes bad and stink before the worms have had a chance to process it. In bins without a lid meat and fish may also attract flies and maggots.
The easiest solution for cooked food probably is to preprocess it in a Bokashi bin. Micro-organisms in the bin will break down the things that are more difficult to compost (like meat and oils). After two weeks you can process the Bokashi bin contents further by throwing it on a compost heap, in a vermicompost bin, or simply by burying it in your garden.
As for the animal feces, they actually can be placed on a compost heap too but the reason why it is not recommended is that animal feces often contain pathogens that can be dangerous to people if they are not processed in the right manner. Feces from rabbits, hamsters and guinea pigs are rather harmless and can be placed on your heap safely. Feces from dogs and cats are more troublesome. Cat feces for example may contain the Toxoplasma gondii parasite that is dangerous for people with a weak immune system and for pregnant women.
sustainability.stackexchange.com
, you're kind of asking the wrong questions. The sustainable (but unpleasant) answer involves not cooking more food than you use, and quite frankly, not having a dog, either.