Prepositions can be tricky because they often have multiple meanings depending on context.
"By" can mean "near", as in, "The house is by the water." It can also mean "using", as in, "We travelled by car." That works here. "We shared by email" means "we shared using email".
"Through" usually means "passing over the boundaries of", as in, "We drove through Spain". It carries the implication of going in and coming back out -- you don't use "through" when you stop inside the place or thing. You might use "into".
We sometimes use "through" to describe a method of communication, I guess on the thinking that the message travels "through" this communication system. Like, "I sent a letter through the mail", as in, the message travelled through the postal system. Or, "We kept in contact through the telephone." So in that sense you can say, "We shared through email", i.e. the sharing went through the email system.
Note this usage is pretty much limited to communication. You wouldn't say, "We travelled through train", you'd say "We travelled by train." ("We travelled through a train" would mean that you walked up and down the length of the train, or that you walked in one door of a train and then out the opposite door, not that the train carried you somewhere.)
The meanings are similar in the first of these examples but the grammar is different.
"Having" is the present participle of the verb "have", so "having different opinions" is a participle clause.
"With" is a preposition, so "with different opinions" is a prepositional phrase.
Both participle clauses and prepositional phrases can function as adverbials, and in your examples the meaning is similar. But not every use of "with" can be replaced by "having"
"I'm going shopping with my friend" is ok. "I'm going shopping having my friend" is not. We would not say "I'm having my friend"
In the second example the clause "Having access to good ideas" is functioning as a noun. In other words this is a gerund.
A prepositional phrase doesn't function as a noun. Therefore the the example "With access...." is not grammatically correct. It reads like a "garden path" sentence. Your brain begins by parsing "With access to good ideas" as an adverbial, and then starts waiting for a subject, which never comes.
So a clause starting "having" can be either a gerund or a participle phrase. A phrase starting "with" can only be a prepositional phrase.
Best Answer
Here are a few alternatives: