the 400 trans will also require all the parts (drum/forks/etc/ AND a different inner clutch basket. TBH, on an r5 that doesnt really make any serious power, not worth it. I like my 6th gear but my 72 has chambers, a digital programmable cdi and a few other things so it can pull 6th pretty well, and was originally set up way back as a track bike. I mean, is it worth it to split the cases? probably not. if you do, then you should also do crank seals, etc. it gets deep quick.
as far as swapping top ends, its a bolt on. literally. carbs work, exhaust, etc. you will need to reroute the oil injection to feed the carbs or intakes somehow, but thats it (assuming you are running the injection pump). there will be more tuning involved as well. you will also need reedcages and intakes, but those can be had cheaply
I'll be honest, if i only had ONE bike, and i was in your position, id do the rd topend swap. I also have a few rds as well, so thats why i haven't swapped any of mine (not trying to be hypocritical, just being honest).
your bike isn't going to be a show bike anytime soon, so swapping topends isn't going to hurt anything, and the rd top-ends do make better power, even with stock r5 pipes. pistons are more readily available, etc. and as weird as it is, its probably the more cost effective option.
i would
strongly recommend changing crank seals on your bike if you haven't or don't know how old they are. you do not need to split the cases on an r5 motor, so you are in luck there.
I mean, it depends where you want to land with it and what your capabilities are. I mean, dig into it, and spend th etime and you'll be rewarded by it, greatly. i havent gotten bored of them yet, and ive had these things for 30+ years.
as far as your front end, many years ago, my original rd had a cl350 front end on it, all i could get at the time, so i get it.
Just remember: free bikes always wind up being the most expensive the longer you own them.

(its not a bad thing) .