Can you see that Amy’s crying? I think she was enjoying that truck. What could we do to make her happy?
OP - good of you to cite & raise questions about those lines & the book that suggested you say them to your very young DD. You do not seem like an idiot; you come across as a concerned, thoughtful, inquiring mom. Please don't put yourself down!
We all want our children to develop empathy, equity/fairness & self-esteem. But these are three different things, & it's best not to try to instill empathy & make our kids share before they're developmentally ready, or in ways that can undercut their emerging sense of self & self-esteem. This is especially the case with daughters, as girls traditionally have been raised to put others before self from the get-go.
IMO trying to instill empathy in a two-year-old of either sex in such forced, overt ways is age-inappropriate; & attempting to do so by saying those particular lines to DD at any age will inadvertently impart some potentially harmful lessons. As others have pointed out, it's teaching DD to focus on & prioritize other people's feelings at an age when she needs to be learning how to feel, name & be OK with her own emotions.
Besides, the fact is, we humans can truly empathize with others only if we've already had the opportunity, time & support to experience, know, appreciate & feel comfortable with the array of emotions in our own psyches first. And the/a main way children learn empathy is by seeing parents & other influential figures demonstrate or model it in the way we treat them & others.
Re the specific situation you described: Instead of posing questions about Amy to DD, it would be better for a parent here to model empathy - as well as curiosity, forthrightness & an awareness that no one, not even moms, can read minds - by simply querying Amy directly & leaving DD out of it altogether.
Better for both children if the grownup here said, "'Amy, I see you are crying. Do you know why? Can you tell me why?" If Amy said, "I want the truck," an appropriate response would be something along the lines of, "You'll have another turn with the truck in a moment. Let's find you a fun toy to play with till then."
If Amy's response reveals she's crying for another reason - maybe her stomach hurts, she's tired, she has a toothache, she hates that she played with a truck in the first place because she identifies as a Barbie doll Disney princess type of girl, or she's suddenly been struck by early-onset gender dysphoria that's causing her to jones for all the trucks & other "boy toys" in the whole world, right now! - then that specific reason could be addressed. And all the while, DD would be left to her own enjoying!
Hope this was helpful. Good luck!