So the short answer is to look at 'life-cycle assessment' studies (LCA).
The longer answer is to ask what you mean by 'better', and then look at a bunch of LCAs and figure out what impact categories you care about most.
In either case, the goal of LCA is to collect all the different inputs and outputs for a product for all stages - not just use, but manufacturing and mining and disposal, etc. These impacts are collected into a smaller number of interpretable impact categories. Some impact categories to think about: carbon footprint/global warming potential, energy consumption, ecotoxicity, human health, water consumption. All of these are pretty commonly used. There is a lot of research on LCA methods, both on how to collect the basic data and how to transform it into these impact categories. Two common methods include the EPA's TRACI or the european ReCiPe. Ideally, LCA's provide a quantitative and clear answer, but that's rarely true - they are quantitative though, which is really important.
For some of your later questions, particularly around batteries, the answers will depend on the study. The technical terms here are allocation and boundary conditions. Do we model battery recycling? who gets the benefits of it? what technologies are we looking at, and what other products do those produce? What impacts or processes do we include or exclude? There are generally a lot of assumptions, which need to be made and defended to move forward - though often they need to be revised for new technology.
To answer your initial question, there was a poorly done report from years ago that purported to show that older Priuses were 'worse' than a Hummer in terms of energy usage. The report was debunked all over the place, but it is true that we've gotten better at making batteries over time. New hybrids have much lower impacts than the originals, and keeping the car longer will definitely decrease the relative impact (one of the assumptions is about how long cars last). Check out a newer study here. In terms of toxicity, here's an older and newer study on the topic - it can take some study to get a reasonable answer, and it's rarely clear-cut. There are almost always tradeoffs.