How do I find a plane's history when booking a flight?
Unless you are booking at the very last minute, no there is no way to find out which particular aircraft you'll be on until you're strapped in. The airline themselves plan in advance but as soon as one plane needs unexpected maintenance, or is excessively delayed, the schedule is thrown out the window. For this reason more than anything no airline to my knowledge publishes this schedule. 

Once you are at the gate you might be able to see the aircraft registration. If you google that you can see if it has been in any serious incidents, when it was delivered and how old it is. You won't be able to find out how many repairs it has gone through, only the airline has that (hint: the answer could be hundreds of times if you're counting minor issues).