Is puppeting a country generally better than just asking it to join my alliance, for the reason that they can only trade with you?
I think you still don't understand. There is no such choice as you deciding - as regards any country - should you puppet it or ask it to join your alliance. A puppet results from a new nation that has been resurrected out of the ashes of destruction. It is territory that has been liberated by the conquer. What territories liberate and what are those new nations is pre-set as to historic ethnic cultural regions that always existed within large countries. What you liberate, that new nation is your puppet. And it automatically joins your alliance.
THE OTHER SCENARIO is you invite an existing country to join your alliance. There must be an ideological match, and good relationship. Once in your alliance, you and that sovereign country can trade to exchange blueprints.
Although I think if I invade a country and liberate it,
NO! You can not liberate who you invade. You can only annex who you are at war with. Out of that destruction - with the original country removed - now you can liberate new nations that more closely resemble the true ethnic origins of that particular region.
EXAMPLE: With the United Kingdom (a colonial power and great oppressor of all it ruled) kicked out of the British Isles you can now liberate the true settlers of that region - which was Scotland, England, and I think it is Wales. NOTE: UK and England are not interchangeable. They are very different things in AoD with England only ever being a liberated new nation that is a puppet of the master who conquered that region and took it away from UK. (Later, if you want, you can release puppets so they become independent sovereign nations.
...a benefit is that they get all or most of my up-to-date techs (doesn't happen with a country that willingly joins your alliance, although can give them the techs over time), but a draw back is all their troops are initially wiped out so you have to wait for them to build new ones if you intend to use them.
You are confusing three things:
1) What you wiped out was an enemy country. You did not wipe out the puppet's troops as the puppet did not even exist. That holds true even if the enemy and newly liberated nation have the same name (as in Canada).
2) What gets all or most of your up-to-date techs is indeed the puppet. As a newly liberated nation, it starts out fairly well tech-wise. Many exceptions exist.
3) A country that willingly joins your alliance can indeed get all your blueprints to so help their research.