First of all that sentence (Anyone having touched this wire will get a shock.) sounds a bit ungrammatical to me. (I am not sure if this sentence formation is correct or not) So for me it doesn't mean anything. Because this sentence doesn't fit in either past perfect tense or in future tense.
Let's take few examples here
- Having got tired from work i turned their offer down to go for a movie.
- Having driven my car for two hours I decided to stop by to take some rest.
Here 'having got tired' means - because i got tired i turned their offer down to go for a movie.
Here 'having driven' means - after i drove my car for two hours I decided to take some rest.
So 'having + verb' can either mean after / because as per the situation.
So your example - (Anyone having touched this wire will get a shock.) It doesn't clarify whether the action has been done or it will be done in future. If it is to be done in future then the sentence would be
- Anyone who touches this wire will get a shock. (Action will happen)
- Anyone will get a shock when he or she touches this wire.
Or when the action has been completed then
Whoever touched this wire got a shock. (Action completed)
Having touched this wire he got a shock. (He got a shock after he touched the wire)