I’m not sure I understand, but I’m trying to figure this out…!
I think the onside kick is usually done by team A after team A has scored and would usually kick the ball down the field to team B, but decide to try and get it back right away by having an onside team A receiver catch it first. I watched a team do this in a CFL game this season, though I don’t recall which team it was, nor the outcome of the play!
An onside kick can be done on any kick, according to that wiki paragraph, so on 3rd (or 4th) down Team A can do the usual thing and kick the ball way down field to team B, or attempt an onside kick to recover it. I think team A needs to pass the first down marker on that play, but it’s basically another (very risky) way to get a first down, other than passing or rushing (I really don’t understand the first down thing in that wiki paragraph).
So when the OP talks about punting on 4th down, and having the “wide out” catch it…if the “wide out” was located behind the punter when the ball was kicked, he could then be allowed to recover the ball for his team.
So while it appears that this is not legal in the NFL, it seems to me that it would be legal in the CFL. Risky and unlikely to succeed, but legal.