I need a nice man for/with whom to work. = I need a nice man I can work for/with.
He is a nice man for/with whom to work. = He is a nice man he*/people? can work for/with.
"Nice" properly applies here to the experience of working for or with the man, not to the man himself. "Pleasant" could be substituted for "nice."
The above paraphrases of
He is a nice man to work for and
I need a nice man to work for seem entirely unsuccessful to me. I recommend:
He is a man for/with whom it is nice to work.
I need a man for/with whom it is nice to work.
Notice that adjectives that obviously modify
man, rather than qualifying the experience of working for/with him, do not work in either construction:
?* He is a tall man to work for. /
*He is a man for whom it is tall to work.
?* He is a Japanese man to work for. /
*He is a man for whom it is Japanese to work.
But when we change to another adjective that qualifies the experience of working for/with him, the construction goes back to being fine:
He is a frustrating man to work for. / He is a man for whom it is frustrating to work.
He is a challenging man to work with. / He is a man with whom it is challenging to work.