Complete transfer of Heat into Work
In an isothermal reversible process the total entropy change of piston and energy reservoirs (surroundings) must be zero, $\Delta S_T = 0$. Thus the entropy of the expanding gas may increase but only if it is compensated for by a decrease in entropy of the reservoirs. So no contradiction of second law. (The heat absorbed from the surroundings is $T\Delta S $ and if this is positive more work can be done by a chemical reaction than the heat of reaction.)

In the second question you will realise that you can turn all the work into heat but not all the heat into work. Its entropy again.