Richard wouldn’t carry the Cooper surname if he was illegitimate. Middle names are often a decent clue you can follow in these cases.
Just one point I can’t see that it says “nee Beckwith” on the baptism for Rachel? Just Hannah Beckwith.
I think "nee" is OP's invention.
On FindMyPast I have found transcripts of some events at Silkstone / and its various chapelries. for beckwiths
Richard buried 1799 s/o John (implying he was a child when he died. John buried 1797 no age on transcript. Rachel buried 1824/5 age 72 (b 1752/3) . Another John 1812 No age given.
Can't find them on Ancestry yet.
If the Hannah burial I found was correct, then she was born about 1791. Could Richard be her brother and John her father? Rachel snr could be her mother if Hannah was last of a large family or possibly her grandmother. Or just a coincidence of names?