Are you trying to stack two lugs and have the bolt press them together? Yes, that would work electrically.
Are you trying to connect a lug to either end of the bolt as a pass-through? That might be a bit sketchy.
Neither of the above would constitute an 'approved' connection from the NEC point of view.
No, that is dangerous for several reasons, and is extremely bad practice and frowned upon.
If you want to feed power through a panel, the only safe and approved method is with something called a "transformer bushing".
Suggest you google that.
Plenty of pictures and info on the internet.