It would really suck to replace an M3 engine out of warranty. You can find an EVO or WRX engine used no problem. The M3 is also not as DIY friendly. You can find a video on the internet and step by step instructions for any EVO or WRX repair or mod, but you will find the vast majority of M3 owners don't DIY repairs or mods.
Great car. Mine is a 2008 with 38k and nothing has gone wrong yet, but I do have a CPO warranty for years 5 and 6. I am not yet sure whether I will keep it after that.
Were I looking for a great performance car that is easy to mod and relatively reasonably priced, I would probably focus on the new Ford Mustang. It has torque, which a lot of people really enjoy. Honestly, I like the M3 as a comfortable 4 door year round daily driver (with snow wheels), but I'd rather have a 7200 rpm redline with 400 lbs torque than an 8200 rpm redline with 300 lbs torque.
If you do buy one, I would get the DCT trans. I think the close ratio 7 speed works better with the low torque high rpm motor than the 6 speed manual trans. It shifts faster than you can shift. DCT does add complexity (potential out of warranty repair)and expense, but the DCT has to be pretty solid if BMW put it behind the new 550 hp M5 motor.