The first concern is you breathing in dust of lead paint while disassembling the building. This could be bad for you and your worker/helpers. I'm not sure you may have to do some research on this.
The next concern is if the boards are painted with lead paint can you just throw them into a dumpster and dispose of them? Will the dumpster company take away wood that has lead paint on them? You may need to research this as well.
If the dumpster company can't take boards that are painted with lead paint what are you going to do with them? You probably shouldn't just burn them as this releases the lead paint into the environment. And it probably isn't allowed.
And if you're restoring this barn to be used as something other than a barn, will lead painted boards/timbers be ok in that application?
If this barn is to be converted into a house then I'm sure you can't use lead painted boards/timbers that are exposed to the interior. Research again maybe needed....
And if it is going to be used as a barn, and should this barn house animals will lead painted boards and/or timbers be ok for them?
The reasons I bring this all up is that you don't want to get thousands of dollars invested in equipment and time and then find out you can't do what you want to do because there is lumber/boards/timbers with lead paint on them that can't be used......