Abstraction Is Your Friend
Use rope and Escape Artist are abstractions. Thus, if you're restraining a prisoner or trying to escape bonds, knowledge of actual fisherman's knots or how to dislocate your thumb in order to escape handcuffs aren't necessary - you roll the dice, and assume your character has the relevant skills if they hit the DC.
But you're asking about a Druid's Wild Shape ability, and how it might be used to escape bonds. There aren't any rules for this that i'm aware of, but it's clearly reasonable that if the bonds are sized for a Medium creature and you shapeshift into a squirrel, then you could easily escape them. However, with that knowledge in mind, bonds could be designed to tie up someone who can shift form.
A wicker cage is a very low tech way to imprison something that can shift form, with guards to use spears or bows to discourage using natural weapons to damage it. Or, perhaps, a trap that relies on the tension of the ropes to stop a large weight being dropped on the druid (or similar deadly peril). Finally, they could find some way to stop the actual transformation - something which restricts the available space would stop the druid transforming into a larger creature, and some situation that made being smaller useless (a solid wooden cage/box?) would render the Wild Shape of little use. Really, measures used to contain animals are your best friend here in terms of theme.
To answer your second question, an idea occurs. Druids cannot wear or hold anything of forged metal without losing their druid class abilities - this includes wildshape/shapeshift. Simply drape the druid in chains, and by the letter of their class rules, they cannot change shape. Since Wild Shape is Su (Supernatural), a pair of antimagic manacles would do a similar trick.
And yes, as attended objects, which is roughly the best we can do to parse 'gear', any ropes or whatnot would meld into the new form. But not anything just sitting nearby(like cages, suspended anvils), only things 'carried' by the Druid.
TL;DR -
Chains will work, because Druids carrying or wearing metal cannot use their druid abilities. RAW only mentions armor, but I believe it stands to reason, and makes sense in the game world, that being heavily coated in chains would work the same. Chains wrapped around the druid not working, but a pair of worked metal bracers working, would be RAW run mad over RAI and the idea of magic having some kind of in-world sense to it.
You could also design some cool method of keeping the druid captive, just to keep things interesting for your players and increase the potential for roleplaying in terms of difficulties of getting the druid out, or interesting escape attempts. (Wicker cage, small wooden box, ropes with suspended anvil/crossbow, sun-baked clay filled wagon)