Yes it is very doable and is a project I've been thinking of doing.
The path I would go would be to purchase an amateur built sailplane with good performance like an HP-11 or HP-14. As an amateur built you can modify it easily paperwork wise.
A glider like an HP-11 that weighs 650lbs and has an L/D of 37 makes 17lbs of drag when flying at max L/D, and you get somewhere around 4-5lbs of thrust from each horsepower with a prop, so the power required to fly level is somewhere around 5 hp. For decent acceleration and climb performance however, you want several times that, at least 100-150lbs, so you need an electric motor that makes at least 20hp, maybe 25 or 30. These sorts of motors are readily available nowadays for electric paramotors.
You want simple simple simple, with the minimum performance penalty. This means NO crazy motor folding gizmos, or exotic mounting. You simply mount the motor on a fixed pylon adapted to the structure around the wing center section, finely faired, with a trail-folding prop. With good streamlined fairing for the pylon and motor and the prop folded back, you might lose, at most, 10-15 points off the L/D. An electric motor glider with a 22 to 27:1 LD is still a pretty good proposition. Not as good as one of the newest high performance electric sailplanes, but you'd only have about 20% of the money into it.
A battery pack would be mounted above and/or below the wing center section in a stainless steel vented fire proof box, with the motor and batteries right on the CG. Based on the numbers I see for electric paramotor setups, 50lbs of batteries might give you around 30-45 min, enough for a launch and several climbs to altitude, or a fairly extended time cruising level with the motor only running at 10 hp (increased from 5 to make up for the drag of the pylon and the higher all up weight - you'd have to increase the gross or reduce your payload obviously).
The main downside is the downside suffered by just about all motor gliders, higher sink rates. It's like water ballast you can never get rid of, so you won't be able to thermal very well on really weak days, but the ability to self launch and operate independently more than makes up for that.
An alternative would be to mount two smaller 15 hp motors on the leading edge on each side in small faired nacelles, but the installation would be a lot more complicated and you would need to find a feathering propeller, which may be tougher to find than a folding one.
