Looking for instructive examples on how to defend against the Giuoco Piano or Giuoco Pianissimo (?) opening from Black's perspective e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 (The Two Knights Defence is my choice) 4. d3 and I am obliged to play the Giuoco Piano 4... Bc5. I am afraid of the middlegame positions that arise after this opening, because to me it seems that white is in the driver's seat being able to play anywhere on the board f.ex c3-d4 or Be3-fxe3 and then doubling rooks on the f-file or pushing a4-b4 and against all of these plans I feel lost. I can't get counterplay. I've attempted the usual operations: developing my pieces, striking in the center with the move d5 and aiming to equalize the game but it's complicated and I often end up losing the game if not in the short run then will have to endure until a blunder happens in the endgame after many moves of torture. Of course there are many other plans that white might execute but that's even worse for me.
[fen &quot;&quot;]
[Event &quot;Ding Liren - Giri&quot;]
[Site &quot;Wenzhou CHN&quot;]
[Date &quot;2017.08.09&quot;]
[EventDate &quot;2017.08.08&quot;]
[Round &quot;2&quot;]
[Result &quot;0-1&quot;]
[White &quot;Ding Liren&quot;]
[Black &quot;Anish Giri&quot;]
[ECO &quot;C50&quot;]
[WhiteElo &quot;2777&quot;]
[BlackElo &quot;2772&quot;]
[PlyCount &quot;90&quot;]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. O-O Nf6 5. d3 O-O 6. h3 d6
7. c3 a6 8. a4 Ba7 9. Re1 h6 10. Nbd2 Be6 11. Bxe6 fxe6
12. Nf1 Nh5 13. Be3 a5 14. Bxa7 Rxa7 15. d4 Qf6 16. Re3 Nf4
17. h4 Qg6 18. g3 Raa8 19. dxe5 Nxe5 20. Nxe5 dxe5 21. f3 Rad8
22. Qc2 Nh5 23. Kh2 Rf6 24. Rd1 Rdf8 25. Rdd3 Qf7 26. Qd1 Rg6
27. Qe1 Qe7 28. Kh3 Rxg3+ 29. Nxg3 Nf4+ 30. Kh2 Qxh4+ 31. Kg1
Rf6 32. Rd8+ Kh7 33. Rd2 Rg6 34. Rg2 h5 35. Rh2 Rxg3+ 36. Kh1
Qg5 37. Qf1 h4 38. Re1 h3 39. Rd1 Qh5 40. Rd7 Qxf3+ 41. Qxf3
Rxf3 42. Rhd2 Kh6 43. Rd8 Kh5 44. Rh8+ Kg4 45. Rd1 Ne2 0-1

I think that the way Anish Giri plays the Italian as Black is very instructive.
It is also funny that White faced all the problems you mentioned having as Black in this game, and it shows how Black avoided the headaches you named.
Some ideas (I would not call them rules...) in the Italian...

I like to go ...a6 and ...Ba7 immediately and only then ...d6. It gets the bishop out of harms way so that we are more flexible in how we react to moves in the center, like d4 (because d4 does not hit the bishop anymore). And we can still retreat it with ...Be7 if that is how we want to parry Bg5 (matter of taste if you want to go for ...h6 and ...g5).
If White goes for the pin with Bg5 before Black has castled kingside, we go ...h6, ...g5 kicking the bishop and we may go for a kingside attack (even after we castle kingside outselves!). A useful maneuver to enable a pawnstorm is ...Nf6-h7 supporting the g5 pawn to play ...h6-h5 (once we are ready).
If White does not go for Bg5 early and plays slowly, a good plan is ...h6, ...Re8, ...Be6 and then ...Rxe6 after the bishops are swapped. The rook may stay on the 6th rank or reatreat back to the 8th.
If White goes for Be3, swapping there is usually okay if we have not played ...h6 yet, as ...h6 weakens squares around our king and we might get crushed after a sacrifice. But you never really have to take and while the rook may look bad on a7, it is not as far from the action as it may seem (see the game I posted).

You will still learn some common mistakes by White, like mistiming d4, leaving f2 vulnerable and others. Another thing to look up is how to deal with unsound sacrifices on f7 or g5 (after ...h6, ...g5 White very often plays Nxg5, but it mostly is not sound).
You also need to look for active play. If White's move seems very slow, or his forces do not look fully coordinated, you might have an opportunity to seize the initiative by striking in the center or on the kingside (mostly). If you look at the game I posted, it is not clear where the initiative of Black came from, but it crushed.